Message ID | 5379A412.3050806@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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))
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(-)