Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,