diff options
author | Dan Carpenter <error27@gmail.com> | 2010-08-26 11:07:24 +0200 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-08-26 18:24:28 +0200 |
commit | f44c3890d9fd6e4284518ff3bb16879fee194a3a (patch) | |
tree | d4b0415abdc334a02454326c05d93c91c2555368 /fs/ceph/debugfs.c | |
parent | ceph: Fix warnings (diff) | |
download | linux-f44c3890d9fd6e4284518ff3bb16879fee194a3a.tar.xz linux-f44c3890d9fd6e4284518ff3bb16879fee194a3a.zip |
ceph: ceph_mdsc_build_path() returns an ERR_PTR
ceph_mdsc_build_path() returns an ERR_PTR but this code is set up to
handle NULL returns.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/debugfs.c')
-rw-r--r-- | fs/ceph/debugfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c index 360c4f22718d..6fd8b20a8611 100644 --- a/fs/ceph/debugfs.c +++ b/fs/ceph/debugfs.c @@ -171,6 +171,8 @@ static int mdsc_show(struct seq_file *s, void *p) } else if (req->r_dentry) { path = ceph_mdsc_build_path(req->r_dentry, &pathlen, &pathbase, 0); + if (IS_ERR(path)) + path = NULL; spin_lock(&req->r_dentry->d_lock); seq_printf(s, " #%llx/%.*s (%s)", ceph_ino(req->r_dentry->d_parent->d_inode), @@ -187,6 +189,8 @@ static int mdsc_show(struct seq_file *s, void *p) if (req->r_old_dentry) { path = ceph_mdsc_build_path(req->r_old_dentry, &pathlen, &pathbase, 0); + if (IS_ERR(path)) + path = NULL; spin_lock(&req->r_old_dentry->d_lock); seq_printf(s, " #%llx/%.*s (%s)", ceph_ino(req->r_old_dentry->d_parent->d_inode), |