Skip to content

Commit

Permalink
writeback: mark background writeback as such
Browse files Browse the repository at this point in the history
If we're doing background type writes, then use the appropriate
background write flags for that.

Signed-off-by: Jens Axboe <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
  • Loading branch information
axboe committed Nov 2, 2016
1 parent 7637241 commit 13edd5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/writeback.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ static inline int wbc_to_write_flags(struct writeback_control *wbc)
{
if (wbc->sync_mode == WB_SYNC_ALL)
return REQ_SYNC;
else if (wbc->for_kupdate || wbc->for_background)
return REQ_BACKGROUND;

return 0;
}
Expand Down

0 comments on commit 13edd5e

Please sign in to comment.