summaryrefslogtreecommitdiffstats
path: root/fs/nfs/delegation.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2011-01-27 20:55:39 +0100
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-01-28 19:37:09 +0100
commite00b8a24041f37e56b4b8415ce4eba1cbc238065 (patch)
treeeb4fbb050e1d4afdd6d10b4b420420fa92ad92a8 /fs/nfs/delegation.c
parentNFS construct consistent co_ownerid for v4.1 (diff)
downloadlinux-e00b8a24041f37e56b4b8415ce4eba1cbc238065.tar.xz
linux-e00b8a24041f37e56b4b8415ce4eba1cbc238065.zip
NFS: Fix an NFS client lockdep issue
There is no reason to be freeing the delegation cred in the rcu callback, and doing so is resulting in a lockdep complaint that rpc_credcache_lock is being called from both softirq and non-softirq contexts. Reported-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@kernel.org
Diffstat (limited to '')
-rw-r--r--fs/nfs/delegation.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 364e4328f392..bbbc6bf5cb2e 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -23,8 +23,6 @@
static void nfs_do_free_delegation(struct nfs_delegation *delegation)
{
- if (delegation->cred)
- put_rpccred(delegation->cred);
kfree(delegation);
}
@@ -37,6 +35,10 @@ static void nfs_free_delegation_callback(struct rcu_head *head)
static void nfs_free_delegation(struct nfs_delegation *delegation)
{
+ if (delegation->cred) {
+ put_rpccred(delegation->cred);
+ delegation->cred = NULL;
+ }
call_rcu(&delegation->rcu, nfs_free_delegation_callback);
}