diff options
| -rw-r--r-- | drivers/md/bcache/request.c | 4 | ||||
| -rw-r--r-- | drivers/md/bcache/writeback.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 40ffe5e424b3..e8a2b693c928 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c | |||
| @@ -404,8 +404,8 @@ static bool check_should_bypass(struct cached_dev *dc, struct bio *bio) | |||
| 404 | 404 | ||
| 405 | if (!congested && | 405 | if (!congested && |
| 406 | mode == CACHE_MODE_WRITEBACK && | 406 | mode == CACHE_MODE_WRITEBACK && |
| 407 | op_is_write(bio_op(bio)) && | 407 | op_is_write(bio->bi_opf) && |
| 408 | (bio->bi_opf & REQ_SYNC)) | 408 | op_is_sync(bio->bi_opf)) |
| 409 | goto rescale; | 409 | goto rescale; |
| 410 | 410 | ||
| 411 | spin_lock(&dc->io_lock); | 411 | spin_lock(&dc->io_lock); |
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, | |||
| 57 | if (would_skip) | 57 | if (would_skip) |
| 58 | return false; | 58 | return false; |
| 59 | 59 | ||
| 60 | return bio->bi_opf & REQ_SYNC || | 60 | return op_is_sync(bio->bi_opf) || in_use <= CUTOFF_WRITEBACK; |
| 61 | in_use <= CUTOFF_WRITEBACK; | ||
| 62 | } | 61 | } |
| 63 | 62 | ||
| 64 | static inline void bch_writeback_queue(struct cached_dev *dc) | 63 | static inline void bch_writeback_queue(struct cached_dev *dc) |
