From 9132c4ff6f9557db3ba10fb321317b4f67626ee8 Mon Sep 17 00:00:00 2001 From: Su Yue Date: Wed, 30 May 2018 14:49:10 +0800 Subject: [PATCH] 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 Reviewed-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/extent-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 9a65df02a13f..3d9fe58c0080 100644 --- a/fs/btrfs/extent-tree.c +++ b/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(); if (!path) - return -ENOENT; + return -ENOMEM; do { ret = check_committed_ref(root, path, objectid, -- 2.30.2