diff options
author | Brian Behlendorf <[email protected]> | 2016-10-28 22:40:14 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-11-02 12:14:45 -0700 |
commit | 48d3eb40c71e5840e4d9e9af7addcfef7c382511 (patch) | |
tree | f8832b7512bcdb948ab48d9fcfd145a91bac7ca6 /module/zfs/zfs_ctldir.c | |
parent | b3c159fee4ab92832e6a735431b8b5f930665fab (diff) |
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 <[email protected]>
Reviewed-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #5347
Diffstat (limited to 'module/zfs/zfs_ctldir.c')
-rw-r--r-- | module/zfs/zfs_ctldir.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c index 44003a5a6..78bc79740 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -147,7 +147,7 @@ zfsctl_snapshot_alloc(char *full_name, char *full_path, spa_t *spa, se->se_spa = spa; se->se_objsetid = objsetid; se->se_root_dentry = root_dentry; - se->se_taskqid = -1; + se->se_taskqid = TASKQID_INVALID; refcount_create(&se->se_refcount); @@ -339,7 +339,7 @@ snapentry_expire(void *data) return; } - se->se_taskqid = -1; + se->se_taskqid = TASKQID_INVALID; (void) zfsctl_snapshot_unmount(se->se_name, MNT_EXPIRE); zfsctl_snapshot_rele(se); @@ -366,7 +366,7 @@ zfsctl_snapshot_unmount_cancel(zfs_snapentry_t *se) ASSERT(RW_LOCK_HELD(&zfs_snapshot_lock)); if (taskq_cancel_id(zfs_expire_taskq, se->se_taskqid) == 0) { - se->se_taskqid = -1; + se->se_taskqid = TASKQID_INVALID; zfsctl_snapshot_rele(se); } } @@ -377,7 +377,7 @@ zfsctl_snapshot_unmount_cancel(zfs_snapentry_t *se) static void zfsctl_snapshot_unmount_delay_impl(zfs_snapentry_t *se, int delay) { - ASSERT3S(se->se_taskqid, ==, -1); + ASSERT3S(se->se_taskqid, ==, TASKQID_INVALID); if (delay <= 0) return; |