alistair23-linux/fs/nfs
Su Yanjun fe1e8dbec1 NFSv3: FIx bug when using chacl and chmod to change acl
We find a bug when running test under nfsv3  as below.
1)
chacl u::r--,g::rwx,o:rw- file1
2)
chmod u+w file1
3)
chacl -l file1

We expect u::rw-, but it shows u::r--, more likely it returns the
cached acl in inode.

We dig the code find that the code path is different.

chacl->..->__nfs3_proc_setacls->nfs_zap_acl_cache
Then nfs_zap_acl_cache clears the NFS_INO_INVALID_ACL in
NFS_I(inode)->cache_validity.

chmod->..->nfs3_proc_setattr
Because NFS_INO_INVALID_ACL has been cleared by chacl path,
nfs_zap_acl_cache wont be called.

nfs_setattr_update_inode will set NFS_INO_INVALID_ACL so let it
before nfs_zap_acl_cache call.

Signed-off-by: Su Yanjun <suyanjun218@gmail.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2020-01-15 10:54:33 -05:00
..
blocklayout
filelayout pNFS/filelayout: enable LAYOUTGET on OPEN 2019-09-24 16:28:38 -04:00
flexfilelayout pNFS/flexfiles: Add tracing for layout errors 2020-01-15 10:54:33 -05:00
cache_lib.c
cache_lib.h
callback.c
callback.h NFSv4: NFSv4 callbacks also support 64-bit timestamps 2019-11-03 21:28:44 -05:00
callback_proc.c NFSv4: nfs4_callback_getattr() should ignore revoked delegations 2019-11-03 21:28:45 -05:00
callback_xdr.c NFS4: Report callback authentication errors 2020-01-15 10:54:31 -05:00
client.c NFS: Additional refactoring for fs_context conversion 2020-01-15 10:15:17 -05:00
delegation.c NFSv4: Handle NFS4ERR_OLD_STATEID in delegreturn 2019-11-03 21:28:46 -05:00
delegation.h NFSv4: Revoke the delegation on success in nfs4_delegreturn_done() 2019-11-03 21:28:46 -05:00
dir.c NFS: Trust cached access if we've already revalidated the inode once 2020-01-15 10:54:33 -05:00
direct.c NFS: Fix nfs_direct_write_reschedule_io() 2020-01-15 10:54:33 -05:00
dns_resolve.c
dns_resolve.h
export.c NFS: Add a tracepoint in nfs_fh_to_dentry() 2019-11-03 21:28:46 -05:00
file.c NFS: Fix up fsync() when the server rebooted 2020-01-15 10:54:32 -05:00
fs_context.c NFS: Add mount option 'softreval' 2020-01-15 10:54:33 -05:00
fscache-index.c nfs: fscache: use timespec64 in inode auxdata 2020-01-15 10:54:30 -05:00
fscache.c nfs: fscache: use timespec64 in inode auxdata 2020-01-15 10:54:30 -05:00
fscache.h nfs: fscache: use timespec64 in inode auxdata 2020-01-15 10:54:30 -05:00
getroot.c NFS: Attach supplementary error information to fs_context. 2020-01-15 10:15:17 -05:00
inode.c NFS: Add mount option 'softreval' 2020-01-15 10:54:33 -05:00
internal.h nfs: use timespec64 in nfs_fattr 2020-01-15 10:54:30 -05:00
io.c
iostat.h
Kconfig nfs: NFS_SWAP should depend on SWAP 2020-01-15 10:54:31 -05:00
Makefile NFS: Move mount parameterisation bits into their own file 2020-01-15 10:15:17 -05:00
mount_clnt.c
namespace.c NFS: Attach supplementary error information to fs_context. 2020-01-15 10:15:17 -05:00
netns.h NFS: Add sysfs support for per-container identifier 2019-07-06 14:54:49 -04:00
nfs.h
nfs2super.c
nfs2xdr.c nfs: remove timespec from xdr_encode_nfstime 2020-01-15 10:54:30 -05:00
nfs3_fs.h NFS: Additional refactoring for fs_context conversion 2020-01-15 10:15:17 -05:00
nfs3acl.c
nfs3client.c NFS: Additional refactoring for fs_context conversion 2020-01-15 10:15:17 -05:00
nfs3proc.c NFSv3: FIx bug when using chacl and chmod to change acl 2020-01-15 10:54:33 -05:00
nfs3super.c
nfs3xdr.c NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() 2020-01-15 10:54:32 -05:00
nfs4_fs.h NFS: Add fs_context support. 2020-01-15 10:15:17 -05:00
nfs4client.c NFS: Additional refactoring for fs_context conversion 2020-01-15 10:15:17 -05:00
nfs4file.c NFS: Add fs_context support. 2020-01-15 10:15:17 -05:00
nfs4getroot.c
nfs4idmap.c Revert "Merge tag 'keys-acl-20190703' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs" 2019-07-10 18:43:43 -07:00
nfs4idmap.h
nfs4namespace.c NFS: Add missing null check for failed allocation 2020-01-15 10:54:31 -05:00
nfs4proc.c NFSv4.x recover from pre-mature loss of openstateid 2020-01-15 10:54:33 -05:00
nfs4renewd.c
nfs4session.c
nfs4session.h
nfs4state.c NFS4: Remove unneeded semicolon 2020-01-15 10:54:31 -05:00
nfs4super.c NFS: Attach supplementary error information to fs_context. 2020-01-15 10:15:17 -05:00
nfs4sysctl.c
nfs4trace.c pNFS/flexfiles: Add tracing for layout errors 2020-01-15 10:54:33 -05:00
nfs4trace.h pNFS/flexfiles: Add tracing for layout errors 2020-01-15 10:54:33 -05:00
nfs4xdr.c NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() 2020-01-15 10:54:32 -05:00
nfs42.h NFS based on file size issue sync copy or fallback to generic copy offload 2019-10-09 12:06:22 -04:00
nfs42proc.c NFSv4.x recover from pre-mature loss of openstateid 2020-01-15 10:54:33 -05:00
nfs42xdr.c NFS: add ca_source_server<> to COPY 2019-10-09 12:05:49 -04:00
nfsroot.c
nfstrace.c
nfstrace.h NFS: Improve tracing of permission calls 2020-01-15 10:54:33 -05:00
pagelist.c NFS: Fix initialisation of I/O result struct in nfs_pgio_rpcsetup 2019-08-19 08:56:04 -04:00
pnfs.c NFSv4.x recover from pre-mature loss of openstateid 2020-01-15 10:54:33 -05:00
pnfs.h pNFS/flexfiles: Record resend attempts on I/O failure 2020-01-15 10:54:32 -05:00
pnfs_dev.c
pnfs_nfs.c NFS/pnfs: Fix pnfs_generic_prepare_to_resend_writes() 2020-01-15 10:54:32 -05:00
proc.c NFS: Add mount option 'softreval' 2020-01-15 10:54:33 -05:00
read.c NFS: When resending after a short write, reset the reply count to zero 2020-01-15 10:54:33 -05:00
super.c NFS: Add mount option 'softreval' 2020-01-15 10:54:33 -05:00
symlink.c
sysctl.c
sysfs.c fs: nfs: sysfs: Remove NULL check before kfree 2019-11-18 10:38:04 +01:00
sysfs.h NFS: Add sysfs support for per-container identifier 2019-07-06 14:54:49 -04:00
unlink.c
write.c NFS: When resending after a short write, reset the reply count to zero 2020-01-15 10:54:33 -05:00