diff options
author | Misono Tomohiro <misono.tomohiro@jp.fujitsu.com> | 2018-06-04 16:41:07 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-06-05 16:11:18 +0200 |
commit | 3ca57bd620639eef8bae4adde2d58fc72109e7c8 (patch) | |
tree | 991f6e71788cb8265b499ffcd48fdc470f5106c3 /fs/btrfs | |
parent | 23d0b79dfaed2305b500b0215b0421701ada6b1a (diff) |
btrfs: Check error of btrfs_iget in btrfs_search_path_in_tree_user
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index d29992f7dc63..5556e9ea2a4b 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -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) { |