All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ceph: remove useless ACL check
       [not found] <1397107160-20844-1-git-send-email-zhenzhang.zhang@huawei.com>
@ 2014-04-10  5:29 ` Zhang Zhen
  2014-04-10  8:16   ` Yan, Zheng
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Zhen @ 2014-04-10  5:29 UTC (permalink / raw)
  To: sage; +Cc: ceph-devel

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>
---
 fs/ceph/acl.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c
index 21887d6..469f2e8 100644
--- a/fs/ceph/acl.c
+++ b/fs/ceph/acl.c
@@ -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;
-- 
1.8.5.5


.





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ceph: remove useless ACL check
  2014-04-10  5:29 ` [PATCH] ceph: remove useless ACL check Zhang Zhen
@ 2014-04-10  8:16   ` Yan, Zheng
  0 siblings, 0 replies; 2+ messages in thread
From: Yan, Zheng @ 2014-04-10  8:16 UTC (permalink / raw)
  To: Zhang Zhen; +Cc: Sage Weil, ceph-devel

On Thu, Apr 10, 2014 at 1:29 PM, Zhang Zhen <zhenzhang.zhang@huawei.com> wrote:
> 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>
> ---
>  fs/ceph/acl.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/fs/ceph/acl.c b/fs/ceph/acl.c
> index 21887d6..469f2e8 100644
> --- a/fs/ceph/acl.c
> +++ b/fs/ceph/acl.c
> @@ -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;
> --
> 1.8.5.5
>

aded to our testing branch. Thanks.

Yan, Zheng

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-10  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1397107160-20844-1-git-send-email-zhenzhang.zhang@huawei.com>
2014-04-10  5:29 ` [PATCH] ceph: remove useless ACL check Zhang Zhen
2014-04-10  8:16   ` Yan, Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.