From: "Bill O'Donnell" <billodo@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [patch] xfs: fix an error code in xfs_fs_fill_super()
Date: Thu, 15 Oct 2015 18:48:15 +0000 [thread overview]
Message-ID: <20151015184815.GA18333@redhat.com> (raw)
In-Reply-To: <20151015181951.GD3163@mwanda>
On Thu, Oct 15, 2015 at 09:19:51PM +0300, Dan Carpenter wrote:
> If alloc_percpu() fails, we accidentally return PTR_ERR(NULL), which
> means success, but we intended to return -ENOMEM.
>
> Fixes: 225e4635580c ('xfs: per-filesystem stats in sysfs')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 368c55a..b2c252c 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1477,7 +1477,7 @@ xfs_fs_fill_super(
> /* Allocate stats memory before we do operations that might use it */
> mp->m_stats.xs_stats = alloc_percpu(struct xfsstats);
> if (!mp->m_stats.xs_stats) {
> - error = PTR_ERR(mp->m_stats.xs_stats);
> + error = -ENOMEM;
> goto out_destroy_counters;
> }
>
Agreed. Thanks for the patch.
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
WARNING: multiple messages have this Message-ID (diff)
From: "Bill O'Donnell" <billodo@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [patch] xfs: fix an error code in xfs_fs_fill_super()
Date: Thu, 15 Oct 2015 13:48:15 -0500 [thread overview]
Message-ID: <20151015184815.GA18333@redhat.com> (raw)
In-Reply-To: <20151015181951.GD3163@mwanda>
On Thu, Oct 15, 2015 at 09:19:51PM +0300, Dan Carpenter wrote:
> If alloc_percpu() fails, we accidentally return PTR_ERR(NULL), which
> means success, but we intended to return -ENOMEM.
>
> Fixes: 225e4635580c ('xfs: per-filesystem stats in sysfs')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 368c55a..b2c252c 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1477,7 +1477,7 @@ xfs_fs_fill_super(
> /* Allocate stats memory before we do operations that might use it */
> mp->m_stats.xs_stats = alloc_percpu(struct xfsstats);
> if (!mp->m_stats.xs_stats) {
> - error = PTR_ERR(mp->m_stats.xs_stats);
> + error = -ENOMEM;
> goto out_destroy_counters;
> }
>
Agreed. Thanks for the patch.
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-10-15 18:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 18:19 [patch] xfs: fix an error code in xfs_fs_fill_super() Dan Carpenter
2015-10-15 18:19 ` Dan Carpenter
2015-10-15 18:48 ` Bill O'Donnell [this message]
2015-10-15 18:48 ` Bill O'Donnell
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=20151015184815.GA18333@redhat.com \
--to=billodo@redhat.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=xfs@oss.sgi.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.