From: Alex Elder <elder@inktank.com>
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
sage@inktank.com, ceph-devel@vger.kernel.org
Subject: Re: [PATCH 3/3] ceph: fix dentry reference leak in ceph_encode_fh().
Date: Tue, 20 Nov 2012 10:21:46 -0600 [thread overview]
Message-ID: <50ABAE1A.2020203@inktank.com> (raw)
In-Reply-To: <1352666971-13551-4-git-send-email-tipecaml@gmail.com>
On 11/11/2012 02:49 PM, Cyril Roelandt wrote:
> dput() was not called in the error path.
>
> Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
This looks good, thanks a lot. I'll apply it.
Reviewed-by: Alex Elder <elder@inktank.com>
> ---
> fs/ceph/export.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ceph/export.c b/fs/ceph/export.c
> index 9349bb3..ca3ab3f 100644
> --- a/fs/ceph/export.c
> +++ b/fs/ceph/export.c
> @@ -56,13 +56,15 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len,
> struct ceph_nfs_confh *cfh = (void *)rawfh;
> int connected_handle_length = sizeof(*cfh)/4;
> int handle_length = sizeof(*fh)/4;
> - struct dentry *dentry = d_find_alias(inode);
> + struct dentry *dentry;
> struct dentry *parent;
>
> /* don't re-export snaps */
> if (ceph_snap(inode) != CEPH_NOSNAP)
> return -EINVAL;
>
> + dentry = d_find_alias(inode);
> +
> /* if we found an alias, generate a connectable fh */
> if (*max_len >= connected_handle_length && dentry) {
> dout("encode_fh %p connectable\n", dentry);
>
WARNING: multiple messages have this Message-ID (diff)
From: Alex Elder <elder@inktank.com>
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
sage@inktank.com, ceph-devel@vger.kernel.org
Subject: Re: [PATCH 3/3] ceph: fix dentry reference leak in ceph_encode_fh().
Date: Tue, 20 Nov 2012 16:21:46 +0000 [thread overview]
Message-ID: <50ABAE1A.2020203@inktank.com> (raw)
In-Reply-To: <1352666971-13551-4-git-send-email-tipecaml@gmail.com>
On 11/11/2012 02:49 PM, Cyril Roelandt wrote:
> dput() was not called in the error path.
>
> Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
This looks good, thanks a lot. I'll apply it.
Reviewed-by: Alex Elder <elder@inktank.com>
> ---
> fs/ceph/export.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/ceph/export.c b/fs/ceph/export.c
> index 9349bb3..ca3ab3f 100644
> --- a/fs/ceph/export.c
> +++ b/fs/ceph/export.c
> @@ -56,13 +56,15 @@ static int ceph_encode_fh(struct inode *inode, u32 *rawfh, int *max_len,
> struct ceph_nfs_confh *cfh = (void *)rawfh;
> int connected_handle_length = sizeof(*cfh)/4;
> int handle_length = sizeof(*fh)/4;
> - struct dentry *dentry = d_find_alias(inode);
> + struct dentry *dentry;
> struct dentry *parent;
>
> /* don't re-export snaps */
> if (ceph_snap(inode) != CEPH_NOSNAP)
> return -EINVAL;
>
> + dentry = d_find_alias(inode);
> +
> /* if we found an alias, generate a connectable fh */
> if (*max_len >= connected_handle_length && dentry) {
> dout("encode_fh %p connectable\n", dentry);
>
next prev parent reply other threads:[~2012-11-20 16:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-11 20:49 [PATCH 0/3] Use dput() after d_find_alias() Cyril Roelandt
2012-11-11 20:49 ` Cyril Roelandt
2012-11-11 20:49 ` [Cocci] [PATCH 1/3] Coccinelle: Add api/d_find_alias.cocci Cyril Roelandt
2012-11-11 20:49 ` Cyril Roelandt
2012-11-11 20:49 ` Cyril Roelandt
2012-11-11 20:49 ` [PATCH 2/3] iommu/tegra-smmu.c: fix dentry reference leak in smmu_debugfs_stats_show() Cyril Roelandt
2012-11-11 20:49 ` Cyril Roelandt
2012-11-12 7:39 ` Hiroshi Doyu
2012-11-12 7:39 ` Hiroshi Doyu
2012-11-17 12:26 ` Joerg Roedel
2012-11-17 12:26 ` Joerg Roedel
2012-11-11 20:49 ` [PATCH 3/3] ceph: fix dentry reference leak in ceph_encode_fh() Cyril Roelandt
2012-11-11 20:49 ` Cyril Roelandt
2012-11-20 16:21 ` Alex Elder [this message]
2012-11-20 16:21 ` Alex Elder
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=50ABAE1A.2020203@inktank.com \
--to=elder@inktank.com \
--cc=ceph-devel@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sage@inktank.com \
--cc=tipecaml@gmail.com \
/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.