summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-04-14 09:53:24 -0600
committerJens Axboe <axboe@fb.com>2016-10-04 10:18:57 -0600
commit0e4e6dcf8e724f78b1452fa3a26d08202cfa575c (patch)
tree8eb15aced92daebb9d7d244d803cf19ed7b16132
parentb74d36372af9189f72e4959b8c8499d5b7731e1e (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 608afd39b1c2..e53abf2bf2d8 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -104,6 +104,8 @@ static inline int wbc_to_write_flags(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 0;
}