diff options
author | Brian Behlendorf <[email protected]> | 2015-12-14 10:59:25 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-12-14 12:06:31 -0800 |
commit | 245b7ab3d1c06efe5b76a9412996fac50aa77f72 (patch) | |
tree | 124c9e2aa1dc69738d2733ab824cfa52f17c78e1 /module | |
parent | 199766017076de5bddd0dad4f95f29361fc04169 (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')
-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 969d6049d..fc46a7307 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); } /* |