summaryrefslogtreecommitdiff
path: root/include/linux/writeback.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-11-01 19:01:35 +0300
committerJens Axboe <axboe@fb.com>2016-11-02 19:24:04 +0300
commit13edd5e7315a26b448c5f7f33fc7721b1e0c17ef (patch)
treeb669ec06704238375271a67f6a2f480c6ea3f2d5 /include/linux/writeback.h
parent7637241e651ec36e409412869f986dd5f097735f (diff)
downloadlinux-13edd5e7315a26b448c5f7f33fc7721b1e0c17ef.tar.xz
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>
Diffstat (limited to 'include/linux/writeback.h')
-rw-r--r--include/linux/writeback.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 50c96ee8108f..c78f9f0920b5 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -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;
}