From: Dan Carpenter <error27@gmail.com> To: Sage Weil <sage@newdream.net> Cc: Yehuda Sadeh <yehuda@hq.newdream.net>, ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR Date: Thu, 26 Aug 2010 09:07:24 +0000 [thread overview] Message-ID: <20100826090724.GA20072@bicker> (raw) 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),
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com> To: Sage Weil <sage@newdream.net> Cc: Yehuda Sadeh <yehuda@hq.newdream.net>, ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR Date: Thu, 26 Aug 2010 11:07:24 +0200 [thread overview] Message-ID: <20100826090724.GA20072@bicker> (raw) 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),
next reply other threads:[~2010-08-26 9:07 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-08-26 9:07 Dan Carpenter [this message] 2010-08-26 9:07 ` [patch] ceph: ceph_mdsc_build_path() returns an ERR_PTR Dan Carpenter 2010-08-26 16:30 ` Sage Weil 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=20100826090724.GA20072@bicker \ --to=error27@gmail.com \ --cc=ceph-devel@vger.kernel.org \ --cc=kernel-janitors@vger.kernel.org \ --cc=sage@newdream.net \ --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: linkBe 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.