Whamcloud - gitweb
LU-18141 osd: don't check for NULL before free'ing 44/56044/2
authorTimothy Day <timday@amazon.com>
Wed, 14 Aug 2024 04:58:01 +0000 (00:58 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:07:49 +0000 (22:07 +0000)
commitde37968c8c3be7dab31754728d859102dd5258b1
treec7611f54db3c637dd8128cb4027022291c1d39b2
parentd12a9b80de078296b6d39a5fde05752796d966b0
LU-18141 osd: don't check for NULL before free'ing

The common free'ing macros already check for NULL,
so we don't need to explicitly check this beforehand.

The patch has been generated with the coccinelle script below.

@@
expression E;
@@
- if (E != NULL)
(
  OBD_FREE_PTR(E);
|
  OBD_FREE(E, ...);
|
  LIBCFS_FREE(E, ...);
|
  CFS_FREE_PTR(E);
|
  CFS_FREE_PTR_ARRAY(E, ...);
)

Test-Parameters: trivial
Test-Parameters: trivial fstype=zfs
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I62d78961192f00faf83f9f3fee3c4bf5b8006863
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56044
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/osd-ldiskfs/osd_compat.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_oi.c