lkml.org 
[lkml]   [2017]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy
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>
> ---
> 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
>

This patch was created on linux-next repo, tag next-20171108.

\
 
 \ /
  Last update: 2017-11-08 21:15    [W:0.051 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site