* Patch "NFSv4: We must set NFS_OPEN_STATE flag in nfs_resync_open_stateid_locked" has been added to the 4.1-stable tree
@ 2015-08-08 22:02 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-08-08 22:02 UTC (permalink / raw)
To: trond.myklebust, gregkh; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
NFSv4: We must set NFS_OPEN_STATE flag in nfs_resync_open_stateid_locked
to the 4.1-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-we-must-set-nfs_open_state-flag-in-nfs_resync_open_stateid_locked.patch
and it can be found in the queue-4.1 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 3c38cbe2ade88240fabb585b408f779ad3b9a31b Mon Sep 17 00:00:00 2001
From: Trond Myklebust <trond.myklebust@primarydata.com>
Date: Wed, 22 Jul 2015 13:46:13 -0400
Subject: NFSv4: We must set NFS_OPEN_STATE flag in nfs_resync_open_stateid_locked
From: Trond Myklebust <trond.myklebust@primarydata.com>
commit 3c38cbe2ade88240fabb585b408f779ad3b9a31b upstream.
Otherwise, nfs4_select_rw_stateid() will always return the zero stateid
instead of the correct open stateid.
Fixes: f95549cf24660 ("NFSv4: More CLOSE/OPEN races")
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, 3 insertions(+)
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1204,12 +1204,15 @@ static bool nfs_need_update_open_stateid
static void nfs_resync_open_stateid_locked(struct nfs4_state *state)
{
+ if (!(state->n_wronly || state->n_rdonly || state->n_rdwr))
+ return;
if (state->n_wronly)
set_bit(NFS_O_WRONLY_STATE, &state->flags);
if (state->n_rdonly)
set_bit(NFS_O_RDONLY_STATE, &state->flags);
if (state->n_rdwr)
set_bit(NFS_O_RDWR_STATE, &state->flags);
+ set_bit(NFS_OPEN_STATE, &state->flags);
}
static void nfs_clear_open_stateid_locked(struct nfs4_state *state,
Patches currently in stable-queue which might be from trond.myklebust@primarydata.com are
queue-4.1/nfsv4-we-must-set-nfs_open_state-flag-in-nfs_resync_open_stateid_locked.patch
queue-4.1/nfs-fix-a-memory-leak-in-nfs_do_recoalesce.patch
queue-4.1/nfs-don-t-revalidate-the-mapping-if-both-size-and-change-attr-are-up-to-date.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-08 22:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-08 22:02 Patch "NFSv4: We must set NFS_OPEN_STATE flag in nfs_resync_open_stateid_locked" has been added to the 4.1-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).