浏览代码

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: 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>
Su Yue 7 年之前
父节点
当前提交
9132c4ff6f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/btrfs/extent-tree.c

+ 1 - 1
fs/btrfs/extent-tree.c

@@ -3272,7 +3272,7 @@ int btrfs_cross_ref_exist(struct btrfs_root *root, u64 objectid, u64 offset,
 
 
 	path = btrfs_alloc_path();
 	path = btrfs_alloc_path();
 	if (!path)
 	if (!path)
-		return -ENOENT;
+		return -ENOMEM;
 
 
 	do {
 	do {
 		ret = check_committed_ref(root, path, objectid,
 		ret = check_committed_ref(root, path, objectid,