Whamcloud - gitweb
LU-18141 mdt: don't check for NULL before free'ing 45/56045/2
authorTimothy Day <timday@amazon.com>
Wed, 14 Aug 2024 04:58:56 +0000 (00:58 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Aug 2024 22:08:05 +0000 (22:08 +0000)
commit8fb94c0a644a0f78e980d520a03d4b6fd95d07c2
treee5cb53b257720f7bbecad90108fe8b6c4c7ac689
parentde37968c8c3be7dab31754728d859102dd5258b1
LU-18141 mdt: 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
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Id08fd059dbc4fcb3508497bdd04c6b00035ff91e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56045
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdt/mdt_batch.c
lustre/mdt/mdt_coordinator.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_hsm_cdt_actions.c
lustre/mdt/mdt_hsm_cdt_agent.c
lustre/mdt/mdt_lproc.c
lustre/mdt/mdt_lvb.c