Commit a60617d0 authored by Salah Triki's avatar Salah Triki Committed by David Sterba

btrfs: Replace -ENOENT by -ERANGE in btrfs_get_acl()

size contains the value returned by posix_acl_from_xattr(), which
returns -ERANGE, -ENODATA, zero, or an integer greater than zero. So
replace -ENOENT by -ERANGE.
Signed-off-by: default avatarSalah Triki <salah.triki@gmail.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 3d48d981
...@@ -55,8 +55,7 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type) ...@@ -55,8 +55,7 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
} }
if (size > 0) { if (size > 0) {
acl = posix_acl_from_xattr(&init_user_ns, value, size); acl = posix_acl_from_xattr(&init_user_ns, value, size);
} else if (size == -ENOENT || size == -ENODATA || size == 0) { } else if (size == -ERANGE || size == -ENODATA || size == 0) {
/* FIXME, who returns -ENOENT? I think nobody */
acl = NULL; acl = NULL;
} else { } else {
acl = ERR_PTR(-EIO); acl = ERR_PTR(-EIO);
......
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