Re: [PATCH] nfs: drop acl cache in __nfs3_proc_setacls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ping?

yangerkun wrote on 2019/2/20 15:29:
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@xxxxxxxxxx>
---
  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:





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux