From b2ba8bc96cfe17ca3e6b65351abbc14313e0d68f Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Tue, 20 May 2025 00:53:02 -0400 Subject: [PATCH] LU-18813 osd: fix dcb_func LASSERT Each OSD was incorrectly asserting that the address of the function pointer was not NULL, instead of the function pointer itself. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: Ie5682a9d80219743ecb86d8d463cbabcdbf77b64 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59304 Reviewed-by: Andreas Dilger Reviewed-by: Qian Yingjin Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/osd-ldiskfs/osd_handler.c | 3 ++- lustre/osd-wbcfs/osd_handler.c | 2 +- lustre/osd-zfs/osd_handler.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index ebf0f10..773e930 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -2280,7 +2280,8 @@ static int osd_trans_cb_add(struct thandle *th, struct dt_txn_commit_cb *dcb) ot_super); LASSERT(dcb->dcb_magic == TRANS_COMMIT_CB_MAGIC); - LASSERT(&dcb->dcb_func != NULL); + LASSERT(dcb->dcb_func); + if (dcb->dcb_flags & DCB_TRANS_STOP) list_add(&dcb->dcb_linkage, &oh->ot_stop_dcb_list); else diff --git a/lustre/osd-wbcfs/osd_handler.c b/lustre/osd-wbcfs/osd_handler.c index 9404211..999e188 100644 --- a/lustre/osd-wbcfs/osd_handler.c +++ b/lustre/osd-wbcfs/osd_handler.c @@ -346,7 +346,7 @@ static int osd_trans_cb_add(struct thandle *th, struct dt_txn_commit_cb *dcb) ot_super); LASSERT(dcb->dcb_magic == TRANS_COMMIT_CB_MAGIC); - LASSERT(&dcb->dcb_func != NULL); + LASSERT(dcb->dcb_func); if (dcb->dcb_flags & DCB_TRANS_STOP) list_add(&dcb->dcb_linkage, &oh->ot_stop_dcb_list); diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index 9ab85fd..8fae9f9 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -161,7 +161,8 @@ static int osd_trans_cb_add(struct thandle *th, struct dt_txn_commit_cb *dcb) ot_super); LASSERT(dcb->dcb_magic == TRANS_COMMIT_CB_MAGIC); - LASSERT(&dcb->dcb_func != NULL); + LASSERT(dcb->dcb_func); + if (dcb->dcb_flags & DCB_TRANS_STOP) list_add(&dcb->dcb_linkage, &oh->ot_stop_dcb_list); else -- 1.8.3.1