Commit e990f167 authored by Miao Xie's avatar Miao Xie Committed by Chris Mason

Btrfs: use bio_endio_nodec instead of open code

Signed-off-by: default avatarMiao Xie <miaox@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 298a8f9c
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment