diff options
author | Brian Behlendorf <[email protected]> | 2015-12-14 10:59:25 -0800 |
---|---|---|
committer | Ned Bass <[email protected]> | 2015-12-23 17:29:34 -0800 |
commit | cb98d1ef271cf870d4b3d2fa419f80eb3621c313 (patch) | |
tree | 5b3c46496410a54e2511b4a568262f1d0058dfac /module/zfs | |
parent | 813a4af70e2f768708ecc4a76c6fa3eecc7a7471 (diff) |
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 <[email protected]>
Signed-off-by: Chunwei Chen <[email protected]>
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/zfs_ctldir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c index 0bfbd7543..572e9652a 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -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); } /* |