diff options
author | Nikolay Borisov <nborisov@suse.com> | 2017-12-11 16:38:48 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-01-22 16:08:16 +0100 |
commit | 3e798068a8ef400049cc3bb4f01f9701a29e1f86 (patch) | |
tree | cf93e3f4ee3a9f085416dbabbcb4bb2ed916c6c2 /fs/btrfs | |
parent | 9ea2c7c9da13c9073e371c046cbbc45481ecb459 (diff) |
btrfs: Remove pair of bio_get/put in btrfs_schedule_bio
This code was added in 492bb6deee34 ("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: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 3690822d469a..9a04245003ab 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -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; } |