Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f44c3890 authored by Dan Carpenter's avatar Dan Carpenter Committed by Sage Weil
Browse files

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: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent ad8453ab
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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),