aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r--fs/btrfs/volumes.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 37972d5db737..54d2685a3071 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5297,9 +5297,14 @@ static void btrfs_end_bio(struct bio *bio, int err)
5297 if (!is_orig_bio) { 5297 if (!is_orig_bio) {
5298 bio_put(bio); 5298 bio_put(bio);
5299 bio = bbio->orig_bio; 5299 bio = bbio->orig_bio;
5300 } else {
5301 atomic_inc(&bio->bi_remaining);
5302 } 5300 }
5301
5302 /*
5303 * We have original bio now. So increment bi_remaining to
5304 * account for it in endio
5305 */
5306 atomic_inc(&bio->bi_remaining);
5307
5303 bio->bi_private = bbio->private; 5308 bio->bi_private = bbio->private;
5304 bio->bi_end_io = bbio->end_io; 5309 bio->bi_end_io = bbio->end_io;
5305 btrfs_io_bio(bio)->mirror_num = bbio->mirror_num; 5310 btrfs_io_bio(bio)->mirror_num = bbio->mirror_num;