diff options
author | Alexander <[email protected]> | 2021-07-20 16:03:33 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-20 08:03:33 -0600 |
commit | 23c13c7e807ec8abb368e00699a34ffe0bd50885 (patch) | |
tree | 623310eaf4dec7404fe78be93fd37a8bdc68eb87 /module/zfs/zvol.c | |
parent | 65b929364162418337ae563fa523d480411790f9 (diff) |
A few fixes of callback typecasting (for the upcoming ClangCFI)
* zio: avoid callback typecasting
* zil: avoid zil_itxg_clean() callback typecasting
* zpl: decouple zpl_readpage() into two separate callbacks
* nvpair: explicitly declare callbacks for xdr_array()
* linux/zfs_nvops: don't use external iput() as a callback
* zcp_synctask: don't use fnvlist_free() as a callback
* zvol: don't use ops->zv_free() as a callback for taskq_dispatch()
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Mark Maybee <[email protected]>
Signed-off-by: Alexander Lobakin <[email protected]>
Closes #12260
Diffstat (limited to 'module/zfs/zvol.c')
-rw-r--r-- | module/zfs/zvol.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index e7b84fa81..c4ecf14df 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -1195,6 +1195,12 @@ zvol_create_minor(const char *name) * Remove minors for specified dataset including children and snapshots. */ +static void +zvol_free_task(void *arg) +{ + ops->zv_free(arg); +} + void zvol_remove_minors_impl(const char *name) { @@ -1243,8 +1249,8 @@ zvol_remove_minors_impl(const char *name) mutex_exit(&zv->zv_state_lock); /* Try parallel zv_free, if failed do it in place */ - t = taskq_dispatch(system_taskq, - (task_func_t *)ops->zv_free, zv, TQ_SLEEP); + t = taskq_dispatch(system_taskq, zvol_free_task, zv, + TQ_SLEEP); if (t == TASKQID_INVALID) list_insert_head(&free_list, zv); } else { |