summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-04-14 09:53:24 -0600
committerJens Axboe <axboe@fb.com>2016-04-17 20:16:44 -0500
commit0749283a42596f741b4fde411f77a516c1705264 (patch)
tree67cc79d40d5f8f2585009b1dcdeaac429b5df778
parentf5dac7d91a584e8b52de0a0bd33787e7300cfdd5 (diff)
writeback: use WRITE_BG for kupdate and background writeback
If we're doing background type writes, then use the appropriate write command for that. Signed-off-by: Jens Axboe <axboe@fb.com>
-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 aa66fa05ff0d..6e4a35acaa3e 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -104,6 +104,8 @@ static inline int wbc_to_write_cmd(struct writeback_control *wbc)
{
if (wbc->sync_mode == WB_SYNC_ALL)
return WRITE_SYNC;
+ else if (wbc->for_kupdate || wbc->for_background)
+ return WRITE_BG;
return WRITE;
}