Commit d054c5eb authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker
Browse files

NFS: Fix attribute delegation behaviour on exclusive create



When the client does an exclusive create and the server decides to store
the verifier in the timestamps, a SETATTR is subsequently sent to fix up
those timestamps. When that is the case, suppress the exceptions for
attribute delegations in nfs4_bitmap_copy_adjust().

Fixes: 32215c1f ("NFSv4: Don't request atime/mtime/size if they are delegated to us")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
parent dc270d71
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3452,6 +3452,10 @@ static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
		adjust_flags |= NFS_INO_INVALID_MODE;
	if (sattr->ia_valid & (ATTR_UID | ATTR_GID))
		adjust_flags |= NFS_INO_INVALID_OTHER;
	if (sattr->ia_valid & ATTR_ATIME)
		adjust_flags |= NFS_INO_INVALID_ATIME;
	if (sattr->ia_valid & ATTR_MTIME)
		adjust_flags |= NFS_INO_INVALID_MTIME;

	do {
		nfs4_bitmap_copy_adjust(bitmask, nfs4_bitmask(server, fattr->label),