summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-06-19 06:42:53 +0400
committerChris Mason <clm@fb.com>2014-06-20 01:20:55 +0400
commite990f16763abad35dd4d0eec791bab37c6987724 (patch)
tree0702ad83275665266be447d8532f0f39ab4f30d9 /fs
parent298a8f9cf17d2f2e1ffc41e5e247fa3695a8a76f (diff)
downloadlinux-e990f16763abad35dd4d0eec791bab37c6987724.tar.xz
Btrfs: use bio_endio_nodec instead of open code
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/volumes.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 19c298a47a6f..31f9036f3171 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -5399,12 +5399,6 @@ static void btrfs_end_bio(struct bio *bio, int err)
bio = bbio->orig_bio;
}
- /*
- * We have original bio now. So increment bi_remaining to
- * account for it in endio
- */
- atomic_inc(&bio->bi_remaining);
-
bio->bi_private = bbio->private;
bio->bi_end_io = bbio->end_io;
btrfs_io_bio(bio)->mirror_num = bbio->mirror_num;
@@ -5422,8 +5416,7 @@ static void btrfs_end_bio(struct bio *bio, int err)
err = 0;
}
kfree(bbio);
-
- bio_endio(bio, err);
+ bio_endio_nodec(bio, err);
} else if (!is_orig_bio) {
bio_put(bio);
}