diff options
author | Alexander <[email protected]> | 2021-07-20 16:03:33 +0200 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2021-09-14 12:39:48 -0700 |
commit | 4affa09f3e6c4c17de8ac187d82071bb39ca57b1 (patch) | |
tree | 5c4f183e170463eafc11a56de6e9eb1fc86a2296 /module/os/linux/zfs/zfs_vnops_os.c | |
parent | 0ca95585616765154a1d9a9d61f965a16a1feaa6 (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/os/linux/zfs/zfs_vnops_os.c')
-rw-r--r-- | module/os/linux/zfs/zfs_vnops_os.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/os/linux/zfs/zfs_vnops_os.c b/module/os/linux/zfs/zfs_vnops_os.c index 6f3faab04..ef99c4864 100644 --- a/module/os/linux/zfs/zfs_vnops_os.c +++ b/module/os/linux/zfs/zfs_vnops_os.c @@ -392,6 +392,12 @@ zfs_write_simple(znode_t *zp, const void *data, size_t len, return (error); } +static void +zfs_rele_async_task(void *arg) +{ + iput(arg); +} + void zfs_zrele_async(znode_t *zp) { @@ -411,7 +417,7 @@ zfs_zrele_async(znode_t *zp) */ if (!atomic_add_unless(&ip->i_count, -1, 1)) { VERIFY(taskq_dispatch(dsl_pool_zrele_taskq(dmu_objset_pool(os)), - (task_func_t *)iput, ip, TQ_SLEEP) != TASKQID_INVALID); + zfs_rele_async_task, ip, TQ_SLEEP) != TASKQID_INVALID); } } |