mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
NFSv4.0: always send mode in SETATTR after EXCLUSIVE4
commita430607b2eupstream. 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:5334c5bdac("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0f64f22c06
commit
edef1086bf
@@ -2422,7 +2422,8 @@ static inline void nfs4_exclusive_attrset(struct nfs4_opendata *opendata,
|
||||
sattr->ia_valid |= ATTR_MTIME;
|
||||
|
||||
/* Except MODE, it seems harmless of setting twice. */
|
||||
if ((attrset[1] & FATTR4_WORD1_MODE))
|
||||
if (opendata->o_arg.createmode != NFS4_CREATE_EXCLUSIVE &&
|
||||
attrset[1] & FATTR4_WORD1_MODE)
|
||||
sattr->ia_valid &= ~ATTR_MODE;
|
||||
|
||||
if (attrset[2] & FATTR4_WORD2_SECURITY_LABEL)
|
||||
|
||||
Reference in New Issue
Block a user