提交 3e798068 编写于 作者: N Nikolay Borisov 提交者: David Sterba

btrfs: Remove pair of bio_get/put in btrfs_schedule_bio

This code was added in 492bb6de ("Btrfs: Hold a reference on bios
during submit_bio, add some extra bio checks"). However, holding a
reference on a bio is necessary only if it's going to be referenced
after the submit_bio returns and the bio is completed. In this
particular instance this is not the case so there is no need to hold
an extra reference since we directly return.
Signed-off-by: NNikolay Borisov <nborisov@suse.com>
Reviewed-by: NLiu Bo <bo.li.liu@oracle.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 9ea2c7c9
......@@ -6132,9 +6132,7 @@ static noinline void btrfs_schedule_bio(struct btrfs_device *device,
/* don't bother with additional async steps for reads, right now */
if (bio_op(bio) == REQ_OP_READ) {
bio_get(bio);
btrfsic_submit_bio(bio);
bio_put(bio);
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册