]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: hold a ref on the root in search_ioctl
authorJosef Bacik <josef@toxicpanda.com>
Fri, 24 Jan 2020 14:32:33 +0000 (09:32 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:28 +0000 (17:01 +0100)
commit2ab1310cee4e87e1706c59f765090f3d95e8d96e
tree1f1c95838979694b8ef11fb4186021fee0fc021c
parenta2fbb58e89af20dc761ed85589ad60cb981bff39
btrfs: hold a ref on the root in search_ioctl

We lookup a arbitrary fs root, we need to hold a ref on that root.  If
we're using our own inodes root then grab a ref on that as well to make
the cleanup easier.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c