diff options
author | Christoph Hellwig <hch@lst.de> | 2016-11-01 16:40:05 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-11-01 18:43:26 +0300 |
commit | 83b5df67c50995ed93b2b7adac3f002ad8bb6069 (patch) | |
tree | 1a4d54bf32b13f1235e45117e45299e6e8380a83 /drivers/md/bcache/writeback.h | |
parent | 03ea4afa67566a3c4e83c0fde8bf0c48f16ac1a3 (diff) | |
download | linux-83b5df67c50995ed93b2b7adac3f002ad8bb6069.tar.xz |
bcache: use op_is_sync to check for synchronous requests
(and remove one layer of masking for the op_is_write call next to it).
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md/bcache/writeback.h')
-rw-r--r-- | drivers/md/bcache/writeback.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bcache/writeback.h b/drivers/md/bcache/writeback.h index 301eaf565167..629bd1a502fd 100644 --- a/drivers/md/bcache/writeback.h +++ b/drivers/md/bcache/writeback.h @@ -57,8 +57,7 @@ static inline bool should_writeback(struct cached_dev *dc, struct bio *bio, if (would_skip) return false; - return bio->bi_opf & REQ_SYNC || - in_use <= CUTOFF_WRITEBACK; + return op_is_sync(bio->bi_opf) || in_use <= CUTOFF_WRITEBACK; } static inline void bch_writeback_queue(struct cached_dev *dc) |