diff options
author | David Sterba <dsterba@suse.com> | 2020-05-15 19:35:55 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 11:25:36 +0200 |
commit | 56e9357a1e8167134388d4c70654795353765c7b (patch) | |
tree | e89265fd992d94c54fffb639cf4ee39bd268cfdb /fs/btrfs/inode.c | |
parent | btrfs: reloc: clear DEAD_RELOC_TREE bit for orphan roots to prevent runaway b... (diff) | |
download | linux-56e9357a1e8167134388d4c70654795353765c7b.tar.xz linux-56e9357a1e8167134388d4c70654795353765c7b.zip |
btrfs: simplify root lookup by id
The main function to lookup a root by its id btrfs_get_fs_root takes the
whole key, while only using the objectid. The value of offset is preset
to (u64)-1 but not actually used until btrfs_find_root that does the
actual search.
Switch btrfs_get_fs_root to use only objectid and remove all local
variables that existed just for the lookup. The actual key for search is
set up in btrfs_get_fs_root, reusing another key variable.
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5be7820afe90..e0e8f74fa262 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5145,7 +5145,7 @@ static int fixup_tree_root_location(struct btrfs_fs_info *fs_info, btrfs_release_path(path); - new_root = btrfs_get_fs_root(fs_info, location, true); + new_root = btrfs_get_fs_root(fs_info, location->objectid, true); if (IS_ERR(new_root)) { err = PTR_ERR(new_root); goto out; |