All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy
@ 2017-11-08 18:53 Tim Hansen
  2017-11-08 18:55 ` Tim Hansen
  2017-11-08 20:00 ` Darrick J. Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Tim Hansen @ 2017-11-08 18:53 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs, linux-kernel, devtimhansen

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Tim Hansen @ 2017-11-08 18:55 UTC (permalink / raw)
  To: darrick.wong; +Cc: linux-xfs, linux-kernel

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] fs/xfs: Remove NULL check before kmem_cache_destroy
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2017-11-08 20:00 UTC (permalink / raw)
  To: Tim Hansen; +Cc: linux-xfs, linux-kernel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-08 20:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.