btrfs: hold a ref on the root in btrfs_ioctl_get_subvol_info
authorJosef Bacik <josef@toxicpanda.com>
Fri, 24 Jan 2020 14:32:36 +0000 (09:32 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:28 +0000 (17:01 +0100)
commit04734e844894ccdfcb907d10eec1433e19d4918a
tree9c495719601c8de74c4bccfd21d1d1859b5de16a
parentb8a49ae1913f1befdbd477f805e99cb61d7971df
btrfs: hold a ref on the root in btrfs_ioctl_get_subvol_info

We look up whatever root userspace has given us, we need to hold a ref
throughout this operation. Use 'root' only for the on fs root and not as
a temporary variable elsewhere.

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