summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-12-05 19:02:53 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-01-06 11:53:53 -0500
commit5cf1c4b19db99d21d44c2ab457cfd44eb86b4439 (patch)
tree83cc059073da8610351b64731f12e0505d11dc0d /fs/lockd
parent67c6d107a689243979a2b5f15244b5261634a924 (diff)
downloadlinux-5cf1c4b19db99d21d44c2ab457cfd44eb86b4439.tar.bz2
NSM: Add dprintk() calls in nsm_find and nsm_release
Introduce some dprintk() calls in fs/lockd/mon.c that are enabled by the NLMDBG_MONITOR flag. These report when we find, create, and release nsm_handles. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/mon.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 8e68e799293c..38255455563d 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -249,10 +249,15 @@ retry:
atomic_inc(&pos->sm_count);
kfree(nsm);
nsm = pos;
+ dprintk("lockd: found nsm_handle for %s (%s), cnt %d\n",
+ pos->sm_name, pos->sm_addrbuf,
+ atomic_read(&pos->sm_count));
goto found;
}
if (nsm) {
list_add(&nsm->sm_link, &nsm_handles);
+ dprintk("lockd: created nsm_handle for %s (%s)\n",
+ nsm->sm_name, nsm->sm_addrbuf);
goto found;
}
spin_unlock(&nsm_lock);
@@ -291,6 +296,8 @@ void nsm_release(struct nsm_handle *nsm)
if (atomic_dec_and_lock(&nsm->sm_count, &nsm_lock)) {
list_del(&nsm->sm_link);
spin_unlock(&nsm_lock);
+ dprintk("lockd: destroyed nsm_handle for %s (%s)\n",
+ nsm->sm_name, nsm->sm_addrbuf);
kfree(nsm);
}
}