Skip to content

Commit

Permalink
btrfs: return ENOMEM if path allocation fails in btrfs_cross_ref_exist
Browse files Browse the repository at this point in the history
The error code does not match the reason of failure and may confuse the
callers.

Signed-off-by: Su Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Su Yue authored and David Sterba committed May 30, 2018
1 parent 1389053 commit 9132c4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -3272,7 +3272,7 @@ int btrfs_cross_ref_exist(struct btrfs_root *root, u64 objectid, u64 offset,

path = btrfs_alloc_path();
if (!path)
return -ENOENT;
return -ENOMEM;

do {
ret = check_committed_ref(root, path, objectid,
Expand Down

0 comments on commit 9132c4f

Please sign in to comment.