From bcde50558418fd91057939476f642d7329a3d4e7 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 4 Apr 2024 19:49:49 +0300 Subject: [PATCH] LU-14911 osp: release thandle if it was created osp_statfs_update() could leak thandle if transaction couldn't start for a reason. Lustre-change: https://review.whamcloud.com/44504 Lustre-commit: c807e3f33b39409a061fa997cac57ac394c503ba Change-Id: I541a5e4a7860008eb179d905ac57997b737f178c Signed-off-by: Alex Zhuravlev Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54670 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger --- lustre/osp/osp_precreate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index cd20168..a503179 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -268,8 +268,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: -- 1.8.3.1