From: Alex Zhuravlev Date: Thu, 5 Aug 2021 05:52:53 +0000 (+0300) Subject: LU-14911 osp: release thandle if it was created X-Git-Tag: 2.14.56~183 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c807e3f33b39409a061fa997cac57ac394c503ba;p=fs%2Flustre-release.git LU-14911 osp: release thandle if it was created osp_statfs_update() could leak thandle if transaction couldn't start for a reason. Signed-off-by: Alex Zhuravlev Change-Id: I541a5e4a7860008eb179d905ac57997b737f178c Reviewed-on: https://review.whamcloud.com/44504 Reviewed-by: Mike Pershin Reviewed-by: Lai Siyao Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 7105cfb..805f87d 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -262,8 +262,8 @@ static int osp_statfs_update(const struct lu_env *env, struct osp_device *d) d->opd_obd->obd_name, atomic_read(&d->opd_sync_changes)); osp_sync_add_commit_cb_1s(env, d, th); - dt_trans_stop(env, d->opd_storage, th); } + dt_trans_stop(env, d->opd_storage, th); } out: