]> git.hungrycats.org Git - linux/commitdiff
btrfs: Replace -ENOENT by -ERANGE in btrfs_get_acl()
authorSalah Triki <salah.triki@gmail.com>
Sun, 3 Jul 2016 04:40:10 +0000 (05:40 +0100)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Wed, 17 Aug 2016 02:36:10 +0000 (22:36 -0400)
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>
(cherry picked from commit a60617d0ae51c22f652b6fcf4ca56558c76e5aad)

fs/btrfs/acl.c

index 6d263bb1621cd92c51cc6ebd014f8ad06dcd719f..4a1f15d8e777a2a676ec738e60fabe9ddd40c104 100644 (file)
@@ -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);