All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sage Weil <sage@newdream.net>
To: Dan Carpenter <error27@gmail.com>
Cc: Yehuda Sadeh <yehuda@hq.newdream.net>,
	ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR
Date: Thu, 26 Aug 2010 16:30:12 +0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1008260930060.22216@cobra.newdream.net> (raw)
In-Reply-To: <20100826090724.GA20072@bicker>

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
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Sage Weil <sage@newdream.net>
To: Dan Carpenter <error27@gmail.com>
Cc: Yehuda Sadeh <yehuda@hq.newdream.net>,
	ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR
Date: Thu, 26 Aug 2010 09:30:12 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.1008260930060.22216@cobra.newdream.net> (raw)
In-Reply-To: <20100826090724.GA20072@bicker>

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
> 
> 

  reply	other threads:[~2010-08-26 16:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-08-26 16:30   ` Sage Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1008260930060.22216@cobra.newdream.net \
    --to=sage@newdream.net \
    --cc=ceph-devel@vger.kernel.org \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=yehuda@hq.newdream.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.