Commit 9db9440f authored by Trond Myklebust's avatar Trond Myklebust Committed by Greg Kroah-Hartman

NFS: Fix an NFS client lockdep issue

commit e00b8a24 upstream.

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: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f5cc0821
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
static void nfs_do_free_delegation(struct nfs_delegation *delegation) static void nfs_do_free_delegation(struct nfs_delegation *delegation)
{ {
if (delegation->cred)
put_rpccred(delegation->cred);
kfree(delegation); kfree(delegation);
} }
...@@ -37,6 +35,10 @@ static void nfs_free_delegation_callback(struct rcu_head *head) ...@@ -37,6 +35,10 @@ static void nfs_free_delegation_callback(struct rcu_head *head)
static void nfs_free_delegation(struct nfs_delegation *delegation) 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); call_rcu(&delegation->rcu, nfs_free_delegation_callback);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment