Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: avoid error code override in btrfs_get_acl

It's not good to override the error code when failing from
btrfs_getxattr() in btrfs_get_acl() because it hides the real reason of
the failure.

Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Chengguang Xu and committed by
David Sterba
dc7789ef 5ee552da

+1 -1
+1 -1
fs/btrfs/acl.c
··· 45 45 } else if (size == -ENODATA || size == 0) { 46 46 acl = NULL; 47 47 } else { 48 - acl = ERR_PTR(-EIO); 48 + acl = ERR_PTR(size); 49 49 } 50 50 kfree(value); 51 51