aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r--drivers/md/bcache/request.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 71eb233b9ace..2a7f0dd6abab 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -996,10 +996,11 @@ static void request_write(struct cached_dev *dc, struct search *s)
996 closure_bio_submit(bio, cl, s->d); 996 closure_bio_submit(bio, cl, s->d);
997 } else { 997 } else {
998 bch_writeback_add(dc); 998 bch_writeback_add(dc);
999 s->op.cache_bio = bio;
999 1000
1000 if (bio->bi_rw & REQ_FLUSH) { 1001 if (bio->bi_rw & REQ_FLUSH) {
1001 /* Also need to send a flush to the backing device */ 1002 /* Also need to send a flush to the backing device */
1002 struct bio *flush = bio_alloc_bioset(0, GFP_NOIO, 1003 struct bio *flush = bio_alloc_bioset(GFP_NOIO, 0,
1003 dc->disk.bio_split); 1004 dc->disk.bio_split);
1004 1005
1005 flush->bi_rw = WRITE_FLUSH; 1006 flush->bi_rw = WRITE_FLUSH;
@@ -1008,8 +1009,6 @@ static void request_write(struct cached_dev *dc, struct search *s)
1008 flush->bi_private = cl; 1009 flush->bi_private = cl;
1009 1010
1010 closure_bio_submit(flush, cl, s->d); 1011 closure_bio_submit(flush, cl, s->d);
1011 } else {
1012 s->op.cache_bio = bio;
1013 } 1012 }
1014 } 1013 }
1015out: 1014out: