* [PATCH] btrfs: remove a FIXME in btrfs_get_acl()
[not found] <1400480536-18691-1-git-send-email-zhenzhang.zhang@huawei.com>
@ 2014-05-19 6:26 ` Zhang Zhen
0 siblings, 0 replies; only message in thread
From: Zhang Zhen @ 2014-05-19 6:26 UTC (permalink / raw)
To: clm, jbacik; +Cc: linux-btrfs
There is no function returns a value of -ENOENT, so the check is
useless.
Remove it, and the redundant braces.
Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
fs/btrfs/acl.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index ff9b399..cae7480 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -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))
--
1.8.1.2
.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-05-19 6:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1400480536-18691-1-git-send-email-zhenzhang.zhang@huawei.com>
2014-05-19 6:26 ` [PATCH] btrfs: remove a FIXME in btrfs_get_acl() Zhang Zhen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).