aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache
diff options
context:
space:
mode:
authorKent Overstreet <kmo@daterainc.com>2013-11-23 21:34:15 -0500
committerKent Overstreet <kmo@daterainc.com>2013-11-24 01:33:56 -0500
commit196d38bccfcfa32faed8c561868336fdfa0fe8e4 (patch)
tree9dee2bc174436072c9e90ffebbe71f47fde63aaf /drivers/md/bcache
parente90abc8ec323c1fd2a25600097ef7ae1e91f39b0 (diff)
block: Generic bio chaining
This adds a generic mechanism for chaining bio completions. This is going to be used for a bio_split() replacement, and it turns out to be very useful in a fair amount of driver code - a fair number of drivers were implementing this in their own roundabout ways, often painfully. Note that this means it's no longer to call bio_endio() more than once on the same bio! This can cause problems for drivers that save/restore bi_end_io. Arguably they shouldn't be saving/restoring bi_end_io at all - in all but the simplest cases they'd be better off just cloning the bio, and immutable biovecs is making bio cloning cheaper. But for now, we add a bio_endio_nodec() for these cases. Signed-off-by: Kent Overstreet <kmo@daterainc.com> Cc: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache')
-rw-r--r--drivers/md/bcache/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bcache/io.c b/drivers/md/bcache/io.c
index 0f0ab659914d..522f95778443 100644
--- a/drivers/md/bcache/io.c
+++ b/drivers/md/bcache/io.c
@@ -133,7 +133,7 @@ static void bch_bio_submit_split_done(struct closure *cl)
133 133
134 s->bio->bi_end_io = s->bi_end_io; 134 s->bio->bi_end_io = s->bi_end_io;
135 s->bio->bi_private = s->bi_private; 135 s->bio->bi_private = s->bi_private;
136 bio_endio(s->bio, 0); 136 bio_endio_nodec(s->bio, 0);
137 137
138 closure_debug_destroy(&s->cl); 138 closure_debug_destroy(&s->cl);
139 mempool_free(s, s->p->bio_split_hook); 139 mempool_free(s, s->p->bio_split_hook);