Skip to contentSkip to conversation

btrfs: remove a FIXME in btrfs_get_acl()

PATCH New Zhang Zhen 1 participant 1 message May 19, 2014 1 message not in the archive Btrfs file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Zhang Zhen

author
#1 lore raw

PATCH 1/1 btrfs: remove a FIXME in btrfs_get_acl()

There is no function returns a value of -ENOENT, so the check is useless.
Remove it, and the redundant braces.

---
 fs/btrfs/acl.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
fs/btrfs/acl.c +3 -5
index ff9b399..cae7480 100644
@@ -53,14 +53,12 @@ struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
 			return ERR_PTR(-ENOMEM);
 		size = __btrfs_getxattr(inode, name, value, size);
 	}
-	if (size > 0) {
+	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 == -ENODATA || size == 0)
 		acl = NULL;
-	} else {
+	else
 		acl = ERR_PTR(-EIO);
-	}
 	kfree(value);
 
 	if (!IS_ERR(acl))
Signature · 4 lines
1.8.1.2


.