aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-12-13 16:43:13 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-02-03 15:35:08 -0800
commite148582e10a2c1a23dfc09210df4a18bc6cca4e9 (patch)
treea6a1aac3b2dda50dc34e41a3e78afee4e4bae58e /fs/nfs
parenta6a352e93dfa78db8903f0e3610abb76efbf7fc9 (diff)
downloadkernel_goldelico_gta04-e148582e10a2c1a23dfc09210df4a18bc6cca4e9.zip
kernel_goldelico_gta04-e148582e10a2c1a23dfc09210df4a18bc6cca4e9.tar.gz
kernel_goldelico_gta04-e148582e10a2c1a23dfc09210df4a18bc6cca4e9.tar.bz2
NFSv4: Add lockdep checks to nfs4_wait_clnt_recover()
Attempt to detect deadlocks due to caller holding locks on clp->cl_sem Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 35bfcce..1712d03 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -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;
}