Skip to content

Commit edef108

Browse files
bcodding-rhgregkh
authored andcommitted
NFSv4.0: always send mode in SETATTR after EXCLUSIVE4
commit a430607b2ef7c3be090f88c71cfcb1b3988aa7c0 upstream. Some nfsv4.0 servers may return a mode for the verifier following an open with EXCLUSIVE4 createmode, but this does not mean the client should skip setting the mode in the following SETATTR. It should only do that for EXCLUSIVE4_1 or UNGAURDED createmode. Fixes: 5334c5b ("NFS: Send attributes in OPEN request for NFS4_CREATE_EXCLUSIVE4_1") Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0f64f22 commit edef108

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/nfs/nfs4proc.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,8 @@ static inline void nfs4_exclusive_attrset(struct nfs4_opendata *opendata,
24222422
sattr->ia_valid |= ATTR_MTIME;
24232423

24242424
/* Except MODE, it seems harmless of setting twice. */
2425-
if ((attrset[1] & FATTR4_WORD1_MODE))
2425+
if (opendata->o_arg.createmode != NFS4_CREATE_EXCLUSIVE &&
2426+
attrset[1] & FATTR4_WORD1_MODE)
24262427
sattr->ia_valid &= ~ATTR_MODE;
24272428

24282429
if (attrset[2] & FATTR4_WORD2_SECURITY_LABEL)

0 commit comments

Comments
 (0)