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.zh...@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


.




--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to