Hold the zfs_snapentry_t before dispatch
While exceptionally unlikely to cause a problem the zfs_snapentry_t hold should be taken before the dispatch to prevent any possibility of the task being processed before the hold. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
This commit is contained in:
parent
813a4af70e
commit
cb98d1ef27
|
@ -381,9 +381,9 @@ zfsctl_snapshot_unmount_delay_impl(zfs_snapentry_t *se, int delay)
|
|||
if (delay <= 0)
|
||||
return;
|
||||
|
||||
zfsctl_snapshot_hold(se);
|
||||
se->se_taskqid = taskq_dispatch_delay(zfs_expire_taskq,
|
||||
snapentry_expire, se, TQ_SLEEP, ddi_get_lbolt() + delay * HZ);
|
||||
zfsctl_snapshot_hold(se);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue