]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: handle NULL roots in btrfs_put/btrfs_grab_fs_root
authorJosef Bacik <josef@toxicpanda.com>
Fri, 24 Jan 2020 14:32:26 +0000 (09:32 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:26 +0000 (17:01 +0100)
commita0bb69a183c1c8ee49509d68697f4b073265188e
treec06cbe900b8e96ef07774238244e15d8550f6bb6
parent1d660afd190c6963dc1d9037de9d76eff0957edb
btrfs: handle NULL roots in btrfs_put/btrfs_grab_fs_root

We want to use this for dropping all roots, and in some error cases we
may not have a root, so handle this to make the cleanup code easier.
Make btrfs_grab_fs_root the same so we can use it in cases where the
root may not exist (like the quota root).

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
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/disk-io.h