]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Remove redundant pair of bio_get/set in __btrfs_submit_dio_bio
authorNikolay Borisov <nborisov@suse.com>
Wed, 13 Dec 2017 08:25:40 +0000 (10:25 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:19 +0000 (16:08 +0100)
commitf9f4d46ded460e1759b113ff24459e4db8b9fc12
treed1a62090f04f66a2df0a50b37b4d2306f98b18ff
parent730e9be76c82a9e46456a9efc7c43b64a1707fea
btrfs: Remove redundant pair of bio_get/set in __btrfs_submit_dio_bio

The bio is not referenced after it has been submitted and the endio is
going to consume the sole reference on successful submission. On error,
the callers of __btrfs_submit_dio_bio do invoke bio_put so we don't
leak it either.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c