aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-10-02 07:55:54 +0200
committerIngo Molnar <mingo@kernel.org>2013-10-02 07:55:54 +0200
commit8a60d42d26d31df8121b251c2b5c56eb24e729f1 (patch)
tree493db0b300a36aa539d7ebe6f8130ad6b54c4a6d /drivers/md/bcache/request.c
parentx86/irq: Correct comment about i8259 initialization (diff)
parentLinux 3.12-rc3 (diff)
downloadwireguard-linux-8a60d42d26d31df8121b251c2b5c56eb24e729f1.tar.xz
wireguard-linux-8a60d42d26d31df8121b251c2b5c56eb24e729f1.zip
Merge tag 'v3.12-rc3' into irq/core
Merge Linux v3.12-rc3, to refresh the tree from a v3.11 base to a v3.12 base. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r--drivers/md/bcache/request.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 786a1a4f74d8..71eb233b9ace 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -997,14 +997,17 @@ static void request_write(struct cached_dev *dc, struct search *s)
} else {
bch_writeback_add(dc);
- if (s->op.flush_journal) {
+ if (bio->bi_rw & REQ_FLUSH) {
/* Also need to send a flush to the backing device */
- s->op.cache_bio = bio_clone_bioset(bio, GFP_NOIO,
- dc->disk.bio_split);
+ struct bio *flush = bio_alloc_bioset(0, GFP_NOIO,
+ dc->disk.bio_split);
- bio->bi_size = 0;
- bio->bi_vcnt = 0;
- closure_bio_submit(bio, cl, s->d);
+ flush->bi_rw = WRITE_FLUSH;
+ flush->bi_bdev = bio->bi_bdev;
+ flush->bi_end_io = request_endio;
+ flush->bi_private = cl;
+
+ closure_bio_submit(flush, cl, s->d);
} else {
s->op.cache_bio = bio;
}