aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/txg.c
diff options
context:
space:
mode:
authorAlexander <[email protected]>2022-11-29 18:56:16 +0100
committerGitHub <[email protected]>2022-11-29 09:56:16 -0800
commitb5459dd3541e76a46d3c49b480742ded05c429fd (patch)
treef8bb3453df83f850386a6245fb6559ce60d93b35 /module/zfs/txg.c
parent587a39b7290b8437dbc15edbf679f33d72459df0 (diff)
Fix the last two CFI callback prototype mismatches
There was the series from me a year ago which fixed most of the callback vs implementation prototype mismatches. It was based on running the CFI-enabled kernel (in permissive mode -- warning instead of panic) and performing a full ZTS cycle, and then fixing all of the problems caught by CFI. Now, Clang 16-dev has new warning flag, -Wcast-function-type-strict, which detect such mismatches at compile-time. It allows to find the remaining issues missed by the first series. There are only two of them left: one for the secpolicy_vnode_setattr() callback and one for taskq_dispatch(). The fix is easy, since they are not used anywhere else. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Lobakin <[email protected]> Closes #14207
Diffstat (limited to 'module/zfs/txg.c')
-rw-r--r--module/zfs/txg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/txg.c b/module/zfs/txg.c
index 29eb9e8e8..ec61cabca 100644
--- a/module/zfs/txg.c
+++ b/module/zfs/txg.c
@@ -429,7 +429,7 @@ txg_quiesce(dsl_pool_t *dp, uint64_t txg)
}
static void
-txg_do_callbacks(list_t *cb_list)
+txg_do_callbacks(void *cb_list)
{
dmu_tx_do_callbacks(cb_list, 0);
@@ -479,7 +479,7 @@ txg_dispatch_callbacks(dsl_pool_t *dp, uint64_t txg)
list_move_tail(cb_list, &tc->tc_callbacks[g]);
- (void) taskq_dispatch(tx->tx_commit_cb_taskq, (task_func_t *)
+ (void) taskq_dispatch(tx->tx_commit_cb_taskq,
txg_do_callbacks, cb_list, TQ_SLEEP);
}
}