Skip to content

Commit

Permalink
NFSv4: Add lockdep checks to nfs4_wait_clnt_recover()
Browse files Browse the repository at this point in the history
Attempt to detect deadlocks due to caller holding locks on clp->cl_sem

Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Feb 3, 2007
1 parent a6a352e commit e148582
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2711,11 +2711,15 @@ static int nfs4_wait_clnt_recover(struct rpc_clnt *clnt, struct nfs_client *clp)

might_sleep();

rwsem_acquire(&clp->cl_sem.dep_map, 0, 0, _RET_IP_);

rpc_clnt_sigmask(clnt, &oldset);
res = wait_on_bit(&clp->cl_state, NFS4CLNT_STATE_RECOVER,
nfs4_wait_bit_interruptible,
TASK_INTERRUPTIBLE);
rpc_clnt_sigunmask(clnt, &oldset);

rwsem_release(&clp->cl_sem.dep_map, 1, _RET_IP_);
return res;
}

Expand Down

0 comments on commit e148582

Please sign in to comment.