From: Andreas Gruenbacher Date: Sun, 23 Oct 2011 17:43:32 +0000 (+0530) Subject: vfs: pass all mask flags check_acl and posix_acl_permission X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=d124b60a838141bb9cac1b6567e9ca4539d1fff0;p=~shefty%2Frdma-dev.git vfs: pass all mask flags check_acl and posix_acl_permission Acked-by: J. Bruce Fields Acked-by: David Howells Signed-off-by: Andreas Gruenbacher Signed-off-by: Aneesh Kumar K.V Signed-off-by: Christoph Hellwig --- diff --git a/fs/namei.c b/fs/namei.c index 2a4574f4800..276cd30ab8f 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -227,8 +227,6 @@ static int acl_permission_check(struct inode *inode, int mask) { unsigned int mode = inode->i_mode; - mask &= MAY_READ | MAY_WRITE | MAY_EXEC | MAY_NOT_BLOCK; - if (current_user_ns() != inode_userns(inode)) goto other_perms; diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 10027b42b7e..cea4623f1ed 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c @@ -218,6 +218,8 @@ posix_acl_permission(struct inode *inode, const struct posix_acl *acl, int want) const struct posix_acl_entry *pa, *pe, *mask_obj; int found = 0; + want &= MAY_READ | MAY_WRITE | MAY_EXEC | MAY_NOT_BLOCK; + FOREACH_ACL_ENTRY(pa, acl, pe) { switch(pa->e_tag) { case ACL_USER_OBJ: