All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "NFSv4.0: always send mode in SETATTR after EXCLUSIVE4" has been added to the 4.9-stable tree
@ 2017-01-30 13:33 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-30 13:33 UTC (permalink / raw)
  To: bcodding, gregkh, trond.myklebust; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    NFSv4.0: always send mode in SETATTR after EXCLUSIVE4

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nfsv4.0-always-send-mode-in-setattr-after-exclusive4.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From a430607b2ef7c3be090f88c71cfcb1b3988aa7c0 Mon Sep 17 00:00:00 2001
From: Benjamin Coddington <bcodding@redhat.com>
Date: Tue, 24 Jan 2017 11:34:20 -0500
Subject: NFSv4.0: always send mode in SETATTR after EXCLUSIVE4

From: Benjamin Coddington <bcodding@redhat.com>

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: 5334c5bdac92 ("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>

---
 fs/nfs/nfs4proc.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2678,7 +2678,8 @@ static inline void nfs4_exclusive_attrse
 		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)


Patches currently in stable-queue which might be from bcodding@redhat.com are

queue-4.9/nfsv4.0-always-send-mode-in-setattr-after-exclusive4.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-30 13:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-30 13:33 Patch "NFSv4.0: always send mode in SETATTR after EXCLUSIVE4" has been added to the 4.9-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.