summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2020-01-24 09:32:56 -0500
committerDavid Sterba <dsterba@suse.com>2020-03-23 17:01:32 +0100
commitbc44d7c4b2b179c4b74fba208b9908e2ecbc1b4d (patch)
tree183d1adc1dcae85af965e25476a5a6c8cbb0137b /fs/btrfs/inode.c
parent81f096edf0472864879e1e5a7f0fdf87ea90fe75 (diff)
downloadlinux-rt-bc44d7c4b2b179c4b74fba208b9908e2ecbc1b4d.tar.gz
btrfs: push btrfs_grab_fs_root into btrfs_get_fs_root
Now that all callers of btrfs_get_fs_root are subsequently calling btrfs_grab_fs_root and handling dropping the ref when they are done appropriately, go ahead and push btrfs_grab_fs_root up into btrfs_get_fs_root. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 324fc79174e6..ab67862bbfd6 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5158,10 +5158,6 @@ static int fixup_tree_root_location(struct btrfs_fs_info *fs_info,
err = PTR_ERR(new_root);
goto out;
}
- if (!btrfs_grab_fs_root(new_root)) {
- err = -ENOENT;
- goto out;
- }
*sub_root = new_root;
location->objectid = btrfs_root_dirid(&new_root->root_item);