ceph: remove useless ACL check
authorZhang Zhen <zhenzhang.zhang@huawei.com>
Thu, 10 Apr 2014 05:29:17 +0000 (13:29 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 6 Jun 2014 01:29:50 +0000 (09:29 +0800)
posix_acl_xattr_set() already does the check, and it's the only
way to feed in an ACL from userspace.
So the check here is useless, remove it.

Signed-off-by: zhang zhen <zhenzhang.zhang@huawei.com>
Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
fs/ceph/acl.c

index 21887d6..469f2e8 100644 (file)
@@ -104,12 +104,6 @@ int ceph_set_acl(struct inode *inode, struct posix_acl *acl, int type)
        umode_t new_mode = inode->i_mode, old_mode = inode->i_mode;
        struct dentry *dentry;
 
-       if (acl) {
-               ret = posix_acl_valid(acl);
-               if (ret < 0)
-                       goto out;
-       }
-
        switch (type) {
        case ACL_TYPE_ACCESS:
                name = POSIX_ACL_XATTR_ACCESS;