Skip to content

Commit d054c5e

Browse files
Trond MyklebustAnna Schumaker
authored andcommitted
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: 32215c1 ("NFSv4: Don't request atime/mtime/size if they are delegated to us") Signed-off-by: Trond Myklebust <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent dc270d7 commit d054c5e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/nfs/nfs4proc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3452,6 +3452,10 @@ static int nfs4_do_setattr(struct inode *inode, const struct cred *cred,
34523452
adjust_flags |= NFS_INO_INVALID_MODE;
34533453
if (sattr->ia_valid & (ATTR_UID | ATTR_GID))
34543454
adjust_flags |= NFS_INO_INVALID_OTHER;
3455+
if (sattr->ia_valid & ATTR_ATIME)
3456+
adjust_flags |= NFS_INO_INVALID_ATIME;
3457+
if (sattr->ia_valid & ATTR_MTIME)
3458+
adjust_flags |= NFS_INO_INVALID_MTIME;
34553459

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

0 commit comments

Comments
 (0)