Skip to contentSkip to conversation

ceph: remove useless ACL check

PATCH In review Zhang Zhen 2 participants 2 messages Apr 10, 2014 1 message not in the archive Ceph client

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 ceph: remove useless ACL check

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.

---
 fs/ceph/acl.c | 6 ------
 1 file changed, 6 deletions(-)
fs/ceph/acl.c +0 -6
index 21887d6..469f2e8 100644
@@ -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;
Signature · 4 lines
1.8.5.5


.
#2 lore raw
Quoted 27 lines · Zhang Zhen

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.

---
 fs/ceph/acl.c | 6 ------
 1 file changed, 6 deletions(-)
fs/ceph/acl.c +0 -7
index 21887d6..469f2e8 100644
@@ -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;
--
Quoted 2 lines

1.8.5.5

aded to our testing branch. Thanks.

Yan, Zheng