The patch below does not apply to the 3.10-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

>From 7c0af9ffb7bb4e5355470fa60b3eb711ddf226fa Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Thu, 26 Feb 2015 12:54:46 -0500
Subject: [PATCH] NFSv4: Don't call put_rpccred() under the rcu_read_lock()

put_rpccred() can sleep.

Fixes: 8f649c3762547 ("NFSv4: Fix the locking in 
nfs_inode_reclaim_delegation()")
Cc: [email protected] # 2.6.35+
Signed-off-by: Trond Myklebust <[email protected]>

diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index a1f0685b42ff..2e37d8315d92 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -181,8 +181,8 @@ void nfs_inode_reclaim_delegation(struct inode *inode, 
struct rpc_cred *cred,
                        clear_bit(NFS_DELEGATION_NEED_RECLAIM,
                                  &delegation->flags);
                        spin_unlock(&delegation->lock);
-                       put_rpccred(oldcred);
                        rcu_read_unlock();
+                       put_rpccred(oldcred);
                        trace_nfs4_reclaim_delegation(inode, 
res->delegation_type);
                } else {
                        /* We appear to have raced with a delegation return. */

--
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