]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Remove pair of bio_get/put in btrfs_schedule_bio
authorNikolay Borisov <nborisov@suse.com>
Mon, 11 Dec 2017 14:38:48 +0000 (16:38 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:16 +0000 (16:08 +0100)
commit727d79ae1d9812a80c4162fbfa8cc7914574f842
treecf93e3f4ee3a9f085416dbabbcb4bb2ed916c6c2
parent31c4fbddec30c6ae2406163644455c7e840ac48b
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>
fs/btrfs/volumes.c