Skip to content

Commit

Permalink
btrfs: Check error of btrfs_iget in btrfs_search_path_in_tree_user
Browse files Browse the repository at this point in the history
The patch introducing the ioctl was not the latest version at the time
of merging to the mainline and needs a fixup from this patch.

Fixes: ba637a252d30 ("btrfs: Check error of btrfs_iget() in btrfs_search_path_in_tree_user")
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
t-msn authored and kdave committed Jun 5, 2018
1 parent 23d0b79 commit 3ca57bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2438,6 +2438,10 @@ static int btrfs_search_path_in_tree_user(struct inode *inode,
}

temp_inode = btrfs_iget(sb, &key2, root, NULL);
if (IS_ERR(temp_inode)) {
ret = PTR_ERR(temp_inode);
goto out;
}
ret = inode_permission(temp_inode, MAY_READ | MAY_EXEC);
iput(temp_inode);
if (ret) {
Expand Down

0 comments on commit 3ca57bd

Please sign in to comment.