From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Tim Hansen <devtimhansen@gmail.com>
Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy
Date: Wed, 8 Nov 2017 12:00:56 -0800 [thread overview]
Message-ID: <20171108200056.GF26910@magnolia> (raw)
In-Reply-To: <20171108185310.GA104610@debian>
On Wed, Nov 08, 2017 at 01:53:10PM -0500, Tim Hansen wrote:
> kmem_cache_destroy already checks for null values.
>
> Signed-off-by: Tim Hansen <devtimhansen@gmail.com>
Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> fs/xfs/kmem.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/xfs/kmem.h b/fs/xfs/kmem.h
> index 7509019..4b87472 100644
> --- a/fs/xfs/kmem.h
> +++ b/fs/xfs/kmem.h
> @@ -119,8 +119,7 @@ kmem_zone_free(kmem_zone_t *zone, void *ptr)
> static inline void
> kmem_zone_destroy(kmem_zone_t *zone)
> {
> - if (zone)
> - kmem_cache_destroy(zone);
> + kmem_cache_destroy(zone);
> }
>
> extern void *kmem_zone_alloc(kmem_zone_t *, xfs_km_flags_t);
> --
> 2.1.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-11-08 20:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-08 18:53 [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy Tim Hansen
2017-11-08 18:55 ` Tim Hansen
2017-11-08 20:00 ` Darrick J. Wong [this message]
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=20171108200056.GF26910@magnolia \
--to=darrick.wong@oracle.com \
--cc=devtimhansen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).