mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
Add TASKQID_INVALID
Add the TASKQID_INVALID macros and update callers to use the macro instead of testing against 0. There is no functional change even though the functions in zfs_ctldir.c incorrectly used -1 instead of 0. Reviewed-by: Tom Caputi <tcaputi@datto.com> Reviewed-by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #5347
This commit is contained in:
+3
-3
@@ -1895,7 +1895,7 @@ zvol_create_minors(spa_t *spa, const char *name, boolean_t async)
|
||||
return;
|
||||
|
||||
id = taskq_dispatch(spa->spa_zvol_taskq, zvol_task_cb, task, TQ_SLEEP);
|
||||
if ((async == B_FALSE) && (id != 0))
|
||||
if ((async == B_FALSE) && (id != TASKQID_INVALID))
|
||||
taskq_wait_id(spa->spa_zvol_taskq, id);
|
||||
}
|
||||
|
||||
@@ -1910,7 +1910,7 @@ zvol_remove_minors(spa_t *spa, const char *name, boolean_t async)
|
||||
return;
|
||||
|
||||
id = taskq_dispatch(spa->spa_zvol_taskq, zvol_task_cb, task, TQ_SLEEP);
|
||||
if ((async == B_FALSE) && (id != 0))
|
||||
if ((async == B_FALSE) && (id != TASKQID_INVALID))
|
||||
taskq_wait_id(spa->spa_zvol_taskq, id);
|
||||
}
|
||||
|
||||
@@ -1926,7 +1926,7 @@ zvol_rename_minors(spa_t *spa, const char *name1, const char *name2,
|
||||
return;
|
||||
|
||||
id = taskq_dispatch(spa->spa_zvol_taskq, zvol_task_cb, task, TQ_SLEEP);
|
||||
if ((async == B_FALSE) && (id != 0))
|
||||
if ((async == B_FALSE) && (id != TASKQID_INVALID))
|
||||
taskq_wait_id(spa->spa_zvol_taskq, id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user