Commit a8614c2e authored by J. R. Okajima's avatar J. R. Okajima
Browse files

aufs: possible bugfix, uncached acl



When a branch filesystem doesn't cache ACL, aufs should not cache
either.  Until now aufs has never met such fs, but theoretically it
could happen.  Actually, in linux-v5.1-rc1, NFSv3 changed its behaviour
by the commit
	ded52fbe7020 2019-02-20 nfs: fix xfstest generic/099 failed on nfsv3
The commit ded52fbe7020 doesn't "forget" the previous acl though.
Doesn't it mean that the obsoleted acl is kept until NFS's attribute
cache is expired?  I don't know.  I've asked it on LKML, but got no
answer.
Signed-off-by: default avatarJ. R. Okajima <hooanon05g@gmail.com>
(cherry picked from commit e448daa00228186b869356fdef8d98d9f95caf53)
parent 8d7b6374
......@@ -37,7 +37,9 @@ struct posix_acl *aufs_get_acl(struct inode *inode, int type)
/* always topmost only */
acl = get_acl(h_inode, type);
if (!IS_ERR_OR_NULL(acl))
if (IS_ERR(acl))
forget_cached_acl(inode, type);
else
set_cached_acl(inode, type, acl);
out:
......@@ -78,12 +80,12 @@ int aufs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
}
ssz = au_sxattr(dentry, inode, &arg);
/* forget even it if succeeds since the branch might set differently */
forget_cached_acl(inode, type);
dput(dentry);
err = ssz;
if (ssz >= 0) {
if (ssz >= 0)
err = 0;
set_cached_acl(inode, type, acl);
}
out:
return err;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment