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

    NFSv4: don't reprocess cached open CLAIM_PREVIOUS

to the 3.12-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-don-t-reprocess-cached-open-claim_previous.patch
and it can be found in the queue-3.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From d2bfda2e7aa036f90ccea610a657064b1e267913 Mon Sep 17 00:00:00 2001
From: Weston Andros Adamson <[email protected]>
Date: Mon, 21 Oct 2013 13:10:13 -0400
Subject: NFSv4: don't reprocess cached open CLAIM_PREVIOUS

From: Weston Andros Adamson <[email protected]>

commit d2bfda2e7aa036f90ccea610a657064b1e267913 upstream.

Cached opens have already been handled by _nfs4_opendata_reclaim_to_nfs4_state
and can safely skip being reprocessed, but must still call update_open_stateid
to make sure that all active fmodes are recovered.

Signed-off-by: Weston Andros Adamson <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/nfs/nfs4proc.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1317,10 +1317,13 @@ _nfs4_opendata_reclaim_to_nfs4_state(str
        struct nfs4_state *state = data->state;
        int ret;
 
-       /* allow cached opens (!rpc_done && !rpc_status) */
-       if (!data->rpc_done && data->rpc_status) {
-               ret = data->rpc_status;
-               goto err;
+       if (!data->rpc_done) {
+               if (data->rpc_status) {
+                       ret = data->rpc_status;
+                       goto err;
+               }
+               /* cached opens have already been processed */
+               goto update;
        }
 
        ret = -ENOMEM;
@@ -1336,6 +1339,7 @@ _nfs4_opendata_reclaim_to_nfs4_state(str
 
        if (data->o_res.delegation_type != 0)
                nfs4_opendata_check_deleg(data, state);
+update:
        update_open_stateid(state, &data->o_res.stateid, NULL,
                            data->o_arg.fmode);
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.12/nfsv4-fix-a-use-after-free-situation-in-_nfs4_proc_getlk.patch
queue-3.12/nfsv4-fix-null-dereference-in-open-recover.patch
queue-3.12/nfs-don-t-retry-detect_trunking-with-rpc_auth_unix-more-than-once.patch
queue-3.12/nfsv4-don-t-reprocess-cached-open-claim_previous.patch
queue-3.12/nfsv4-don-t-fail-on-missing-fattr-in-open-recover.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to