aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/cluster/netdebug.c
diff options
context:
space:
mode:
authorSunil Mushran <sunil.mushran@oracle.com>2010-12-20 19:35:00 -0500
committerJoel Becker <joel.becker@oracle.com>2010-12-22 21:34:45 -0500
commit37096a7927decb0b1d3c2514b8adb4583a834112 (patch)
tree1500e34f68ff72d35c84a33884bc5ecb31d0474c /fs/ocfs2/cluster/netdebug.c
parent02bd9c394ef64a16a313eb4d968a94b7000c5d00 (diff)
ocfs2/dlm: Minor cleanup
Patch makes use of task_pid_nr(). Also removes the null check before calling debugfs_remove(). Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/cluster/netdebug.c')
-rw-r--r--fs/ocfs2/cluster/netdebug.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/fs/ocfs2/cluster/netdebug.c b/fs/ocfs2/cluster/netdebug.c
index a3f150e52b02..0edf836b42d5 100644
--- a/fs/ocfs2/cluster/netdebug.c
+++ b/fs/ocfs2/cluster/netdebug.c
@@ -141,7 +141,7 @@ static int nst_seq_show(struct seq_file *seq, void *v)
141 " sock acquiry: %lu.%ld\n" 141 " sock acquiry: %lu.%ld\n"
142 " send start: %lu.%ld\n" 142 " send start: %lu.%ld\n"
143 " wait start: %lu.%ld\n", 143 " wait start: %lu.%ld\n",
144 nst, (unsigned long)nst->st_task->pid, 144 nst, (unsigned long)task_pid_nr(nst->st_task),
145 (unsigned long)nst->st_task->tgid, 145 (unsigned long)nst->st_task->tgid,
146 nst->st_task->comm, nst->st_node, 146 nst->st_task->comm, nst->st_node,
147 nst->st_sc, nst->st_id, nst->st_msg_type, 147 nst->st_sc, nst->st_id, nst->st_msg_type,
@@ -421,23 +421,17 @@ int o2net_debugfs_init(void)
421 421
422 return 0; 422 return 0;
423bail: 423bail:
424 if (sc_dentry) 424 debugfs_remove(sc_dentry);
425 debugfs_remove(sc_dentry); 425 debugfs_remove(nst_dentry);
426 if (nst_dentry) 426 debugfs_remove(o2net_dentry);
427 debugfs_remove(nst_dentry);
428 if (o2net_dentry)
429 debugfs_remove(o2net_dentry);
430 return -ENOMEM; 427 return -ENOMEM;
431} 428}
432 429
433void o2net_debugfs_exit(void) 430void o2net_debugfs_exit(void)
434{ 431{
435 if (sc_dentry) 432 debugfs_remove(sc_dentry);
436 debugfs_remove(sc_dentry); 433 debugfs_remove(nst_dentry);
437 if (nst_dentry) 434 debugfs_remove(o2net_dentry);
438 debugfs_remove(nst_dentry);
439 if (o2net_dentry)
440 debugfs_remove(o2net_dentry);
441} 435}
442 436
443#endif /* CONFIG_DEBUG_FS */ 437#endif /* CONFIG_DEBUG_FS */