btrfs: simplify iget helpers
The inode lookup starting at btrfs_iget takes the full location key, while only the objectid is used to match the inode, because the lookup happens inside the given root thus the inode number is unique. The entire location key is properly set up in btrfs_init_locked_inode. Simplify the helpers and pass only inode number, renaming it to 'ino' instead of 'objectid'. This allows to remove temporary variables key, saving some stack space. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -2424,7 +2424,7 @@ static int btrfs_search_path_in_tree_user(struct inode *inode,
|
||||
goto out_put;
|
||||
}
|
||||
|
||||
temp_inode = btrfs_iget(sb, &key2, root);
|
||||
temp_inode = btrfs_iget(sb, key2.objectid, root);
|
||||
if (IS_ERR(temp_inode)) {
|
||||
ret = PTR_ERR(temp_inode);
|
||||
goto out_put;
|
||||
|
Reference in New Issue
Block a user