* [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR
@ 2010-08-26 9:07 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-08-26 9:07 UTC (permalink / raw)
To: Sage Weil; +Cc: Yehuda Sadeh, ceph-devel, kernel-janitors
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>
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index 360c4f2..6fd8b20 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),
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR
@ 2010-08-26 9:07 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2010-08-26 9:07 UTC (permalink / raw)
To: Sage Weil; +Cc: Yehuda Sadeh, ceph-devel, kernel-janitors
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>
diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
index 360c4f2..6fd8b20 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),
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR
2010-08-26 9:07 ` Dan Carpenter
@ 2010-08-26 16:30 ` Sage Weil
-1 siblings, 0 replies; 4+ messages in thread
From: Sage Weil @ 2010-08-26 16:30 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Yehuda Sadeh, ceph-devel, kernel-janitors
Applied, thanks!
sage
On Thu, 26 Aug 2010, Dan Carpenter wrote:
> 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>
>
> diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
> index 360c4f2..6fd8b20 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),
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR
@ 2010-08-26 16:30 ` Sage Weil
0 siblings, 0 replies; 4+ messages in thread
From: Sage Weil @ 2010-08-26 16:30 UTC (permalink / raw)
To: Dan Carpenter; +Cc: Yehuda Sadeh, ceph-devel, kernel-janitors
Applied, thanks!
sage
On Thu, 26 Aug 2010, Dan Carpenter wrote:
> 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>
>
> diff --git a/fs/ceph/debugfs.c b/fs/ceph/debugfs.c
> index 360c4f2..6fd8b20 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),
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-08-26 16:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-26 9:07 [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR Dan Carpenter
2010-08-26 9:07 ` Dan Carpenter
2010-08-26 16:30 ` Sage Weil
2010-08-26 16:30 ` Sage Weil
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.