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>
This commit is contained in:
parent
ad8453ab0a
commit
f44c3890d9
|
@ -171,6 +171,8 @@ static int mdsc_show(struct seq_file *s, void *p)
|
||||||
} else if (req->r_dentry) {
|
} else if (req->r_dentry) {
|
||||||
path = ceph_mdsc_build_path(req->r_dentry, &pathlen,
|
path = ceph_mdsc_build_path(req->r_dentry, &pathlen,
|
||||||
&pathbase, 0);
|
&pathbase, 0);
|
||||||
|
if (IS_ERR(path))
|
||||||
|
path = NULL;
|
||||||
spin_lock(&req->r_dentry->d_lock);
|
spin_lock(&req->r_dentry->d_lock);
|
||||||
seq_printf(s, " #%llx/%.*s (%s)",
|
seq_printf(s, " #%llx/%.*s (%s)",
|
||||||
ceph_ino(req->r_dentry->d_parent->d_inode),
|
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) {
|
if (req->r_old_dentry) {
|
||||||
path = ceph_mdsc_build_path(req->r_old_dentry, &pathlen,
|
path = ceph_mdsc_build_path(req->r_old_dentry, &pathlen,
|
||||||
&pathbase, 0);
|
&pathbase, 0);
|
||||||
|
if (IS_ERR(path))
|
||||||
|
path = NULL;
|
||||||
spin_lock(&req->r_old_dentry->d_lock);
|
spin_lock(&req->r_old_dentry->d_lock);
|
||||||
seq_printf(s, " #%llx/%.*s (%s)",
|
seq_printf(s, " #%llx/%.*s (%s)",
|
||||||
ceph_ino(req->r_old_dentry->d_parent->d_inode),
|
ceph_ino(req->r_old_dentry->d_parent->d_inode),
|
||||||
|
|
Loading…
Reference in New Issue