1
0
Fork 0

writeback: mark background writeback as such

If we're doing background type writes, then use the appropriate
background write flags for that.

Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
hifive-unleashed-5.1
Jens Axboe 2016-11-01 10:01:35 -06:00
parent 7637241e65
commit 13edd5e731
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}