From: yangerkun <yangerkun@huawei.com>
To: <trond.myklebust@hammerspace.com>, <anna.schumaker@netapp.com>
Cc: <houtao1@huawei.com>, <zhangxiaoxu5@huawei.com>,
<yi.zhang@huawei.com>, <yangerkun@huawei.com>,
<linux-nfs@vger.kernel.org>
Subject: [PATCH] nfs: drop acl cache in __nfs3_proc_setacls
Date: Wed, 20 Feb 2019 15:29:25 +0800 [thread overview]
Message-ID: <20190220072925.103352-1-yangerkun@huawei.com> (raw)
Since server may call posix_acl_update_mode which can lead acl been
NULL. So,just drop acl cache after rpc_call_sync, and if anyone want to
use acl, they can get the correct acl by send a msg to server themselves.
This can fix xfstests generic/099 over nfsv3.
Signed-off-by: yangerkun <yangerkun@huawei.com>
---
fs/nfs/nfs3acl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/nfs3acl.c b/fs/nfs/nfs3acl.c
index 9fce185..6c07ebc 100644
--- a/fs/nfs/nfs3acl.c
+++ b/fs/nfs/nfs3acl.c
@@ -222,8 +222,8 @@ static int __nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
switch (status) {
case 0:
status = nfs_refresh_inode(inode, fattr);
- set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
- set_cached_acl(inode, ACL_TYPE_DEFAULT, dfacl);
+ /* Sever may call posix_acl_update_mode */
+ forget_all_cached_acls(inode);
break;
case -EPFNOSUPPORT:
case -EPROTONOSUPPORT:
--
2.9.5
next reply other threads:[~2019-02-20 7:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-20 7:29 yangerkun [this message]
2019-02-22 7:35 ` [PATCH] nfs: drop acl cache in __nfs3_proc_setacls yangerkun
2019-02-22 13:51 ` Trond Myklebust
2019-02-23 2:00 ` yangerkun
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=20190220072925.103352-1-yangerkun@huawei.com \
--to=yangerkun@huawei.com \
--cc=anna.schumaker@netapp.com \
--cc=houtao1@huawei.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
--cc=yi.zhang@huawei.com \
--cc=zhangxiaoxu5@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox