summaryrefslogtreecommitdiff
path: root/fs/ceph/debugfs.c
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-02-05 21:40:09 (GMT)
committerYan, Zheng <zheng.z.yan@intel.com>2014-04-03 02:33:53 (GMT)
commit844d87c3329980e2b1849cf53205d7fa965d8995 (patch)
tree46e524da39d068d18d03502323871099144dec4c /fs/ceph/debugfs.c
parent752c8bdcfe88f27a17c5c9264df928fd145a4b30 (diff)
downloadlinux-844d87c3329980e2b1849cf53205d7fa965d8995.tar.xz
ceph: do not assume r_old_dentry[_dir] always set together
Do not assume that r_old_dentry implies that r_old_dentry_dir is also true. Separate out the ref cleanup and make the debugs dump behave when it is NULL. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph/debugfs.c')
-rw-r--r--fs/ceph/debugfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index 6d59006..8c6f313 100644
--- a/fs/ceph/debugfs.c
+++ b/fs/ceph/debugfs.c
@@ -102,7 +102,8 @@ static int mdsc_show(struct seq_file *s, void *p)
path = NULL;
spin_lock(&req->r_old_dentry->d_lock);
seq_printf(s, " #%llx/%.*s (%s)",
- ceph_ino(req->r_old_dentry_dir),
+ req->r_old_dentry_dir ?
+ ceph_ino(req->r_old_dentry_dir) : 0,
req->r_old_dentry->d_name.len,
req->r_old_dentry->d_name.name,
path ? path : "");