Skip to contentSkip to conversation

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

PATCH In review Salah Triki 2 participants 2 messages Jul 3, 2016 – Jul 4, 2016 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: 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.

---
 fs/btrfs/acl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
fs/btrfs/acl.c +1 -2
index 67a6077..53bb7af 100644
@@ -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);
Signature · 1 line
1.9.1