summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/acl.c
diff options
context:
space:
mode:
authorSalah Triki <salah.triki@gmail.com>2016-07-03 06:40:10 +0200
committerDavid Sterba <dsterba@suse.com>2016-07-26 13:52:25 +0200
commita60617d0ae51c22f652b6fcf4ca56558c76e5aad (patch)
tree8516f9a6c311843449b25389d57e7ec11cf5b3a8 /fs/btrfs/acl.c
parentbtrfs: Handle uninitialised inode eviction (diff)
downloadlinux-a60617d0ae51c22f652b6fcf4ca56558c76e5aad.tar.xz
linux-a60617d0ae51c22f652b6fcf4ca56558c76e5aad.zip
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: Salah Triki <salah.triki@gmail.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/acl.c')
-rw-r--r--fs/btrfs/acl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 67a607709d4f..53bb7af4e5f0 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -55,8 +55,7 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
}
if (size > 0) {
acl = posix_acl_from_xattr(&init_user_ns, value, size);
- } else if (size == -ENOENT || size == -ENODATA || size == 0) {
- /* FIXME, who returns -ENOENT? I think nobody */
+ } else if (size == -ERANGE || size == -ENODATA || size == 0) {
acl = NULL;
} else {
acl = ERR_PTR(-EIO);