Whamcloud - gitweb
LU-14004 llite: default lsm update may memory leak
authorLai Siyao <lai.siyao@whamcloud.com>
Sun, 27 Sep 2020 06:36:57 +0000 (14:36 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Wed, 4 Aug 2021 17:25:17 +0000 (17:25 +0000)
commit49ab1509427738607c8a0be1f7bb94a952c98ea3
tree01f1b689787f0a0150397d6ef2eb96731154f963
parent09d4f0977e3f32fbe3eb852145f1dbb3bf2d49be
LU-14004 llite: default lsm update may memory leak

ll_update_default_lsm_md() should check whether lli_default_lsm_md
is set before setting it to the data from lustre_md, and if it's set,
release the old data to avoid memory leak.

Lustre-change: https://review.whamcloud.com/40103
Lustre-commit: cd2ad336177f8f3130de264709dc326349a22b23

Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: I9c8434c5d62f9fb751788031d6769fd49427c371
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44454
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/llite_lib.c