Skip to content

Commit

Permalink
NFS: Fix an NFS client lockdep issue
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
Cc: [email protected]
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jan 28, 2011
1 parent c7a360b commit e00b8a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/nfs/delegation.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@

static void nfs_do_free_delegation(struct nfs_delegation *delegation)
{
if (delegation->cred)
put_rpccred(delegation->cred);
kfree(delegation);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit e00b8a2

Please sign in to comment.