OSDN Git Service

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)
commit3ca35e839e949811c7e35b7ef786de225a1c5008
tree1f1c95838979694b8ef11fb4186021fee0fc021c
parentfc92f79856aaf4edb51ef8ca7650747df34b6dd6
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