Commit 9132c4ff authored by Su Yue's avatar Su Yue Committed by David Sterba

btrfs: return ENOMEM if path allocation fails in btrfs_cross_ref_exist

The error code does not match the reason of failure and may confuse the
callers.
Signed-off-by: default avatarSu Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 1389053e
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment