Whamcloud - gitweb
LU-18813 osd: fix dcb_func LASSERT 04/59304/2
authorTimothy Day <timday@amazon.com>
Tue, 20 May 2025 04:53:02 +0000 (00:53 -0400)
committerOleg Drokin <green@whamcloud.com>
Sat, 7 Jun 2025 23:03:55 +0000 (23:03 +0000)
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 <timday@amazon.com>
Change-Id: Ie5682a9d80219743ecb86d8d463cbabcdbf77b64
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/59304
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-wbcfs/osd_handler.c
lustre/osd-zfs/osd_handler.c

index ebf0f10..773e930 100644 (file)
@@ -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
index 9404211..999e188 100644 (file)
@@ -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);
index 9ab85fd..8fae9f9 100644 (file)
@@ -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