From: "Benjamin Coddington" <bcodding@redhat.com>
To: chendt <chendt.fnst@cn.fujitsu.com>
Cc: linux-nfs@vger.kernel.org,
"Trond Myklebust" <trond.myklebust@primarydata.com>
Subject: Re: [PATCH] NFSv3/acl: forget acl cache after setattr
Date: Wed, 28 Mar 2018 16:48:36 -0400 [thread overview]
Message-ID: <DE56FEF6-A0F6-4584-B6B5-517FDCE80531@redhat.com> (raw)
In-Reply-To: <ca4d7366-bc4c-1710-13a2-f99510c53be4@cn.fujitsu.com>
I'm seeing this on xfstests generic/099 as well. Do we want to use
nfs_zap_acl_cache() instead so that we clear NFS_INO_INVALID_ACL?
Ben
On 28 Mar 2018, at 6:12, chendt wrote:
> Sync of ACL with std permissions fail,do We need to forget the ACL
> cache after setattr?
>
> Reproduction:
> #!/bin/bash
> touch testfile
> cat <<EOF >testfile
> #!/bin/bash
> echo "Test was executed"
> EOF
> chmod u=rwx testfile
> chmod g=rw- testfile
> chmod o=r-- testfile
>
> chacl u::r--,g::rwx,o:rw- testfile
> chmod u+w testfile
> ls -ln testfile
> chacl -l testfile
>
> Output:
> -rw-rwxrw- 1 root root 0 Mar 28 05:29 testfile
> testfile [u::r--,g::rwx,o::rw-]
>
> Signed-off-by: chendt.fnst <chendt.fnst@cn.fujitsu.com>
> ---
> fs/nfs/nfs3proc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
> index 7327930..ef3e17c 100644
> --- a/fs/nfs/nfs3proc.c
> +++ b/fs/nfs/nfs3proc.c
> @@ -140,6 +140,7 @@
> status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
> if (status == 0)
> nfs_setattr_update_inode(inode, sattr, fattr);
> + forget_all_cached_acls(inode);
> dprintk("NFS reply setattr: %d\n", status);
> return status;
> }
> --
> 1.8.3.1
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-03-28 20:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-28 10:12 [PATCH] NFSv3/acl: forget acl cache after setattr chendt
2018-03-28 20:48 ` Benjamin Coddington [this message]
2018-03-29 6:01 ` [PATCH v2] " chendt
2018-03-29 6:47 ` Kinglong Mee
2018-03-29 8:13 ` [PATCH v3] " chendt
2018-03-29 10:07 ` [PATCH] " kbuild test robot
2018-03-29 11:39 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DE56FEF6-A0F6-4584-B6B5-517FDCE80531@redhat.com \
--to=bcodding@redhat.com \
--cc=chendt.fnst@cn.fujitsu.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@primarydata.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.