Skip to content

Commit 892dd68

Browse files
committed
matt feedback
1 parent 291d080 commit 892dd68

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

man/man8/zfs-wait.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
Waits until all background activity of the given types has ceased in the given
5050
filesystem.
5151
The activity could cease because it has completed or because the filesystem has
52-
been destroyed.
52+
been destroyed or unmounted.
5353
If no activities are specified, the command waits until background activity of
5454
every type listed below has ceased.
5555
If there is no activity of the given types in progress, the command returns

module/zfs/dsl_dataset.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3235,8 +3235,6 @@ dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx)
32353235

32363236
VERIFY0(dsl_dataset_hold(dp, ddra->ddra_fsname, FTAG, &ds));
32373237

3238-
dsl_dir_cancel_waiters(ds->ds_dir);
3239-
32403238
dsl_dataset_name(ds->ds_prev, namebuf);
32413239
fnvlist_add_string(ddra->ddra_result, "target", namebuf);
32423240

module/zfs/dsl_destroy.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -763,14 +763,11 @@ dsl_destroy_head_check_impl(dsl_dataset_t *ds, int expected_holds)
763763
if (ds->ds_is_snapshot)
764764
return (SET_ERROR(EINVAL));
765765

766-
dsl_dir_t *dd = ds->ds_dir;
767-
mutex_enter(&dd->dd_activity_lock);
768-
if (zfs_refcount_count(&ds->ds_longholds) != expected_holds +
769-
dd->dd_activity_count) {
770-
mutex_exit(&dd->dd_activity_lock);
766+
if (zfs_refcount_count(&ds->ds_longholds) != expected_holds)
771767
return (SET_ERROR(EBUSY));
772-
}
773-
mutex_exit(&dd->dd_activity_lock);
768+
769+
ASSERT0(ds->ds_dir->dd_activity_count);
770+
mutex_exit(&ds->ds_dir->dd_activity_lock);
774771

775772
mos = ds->ds_dir->dd_pool->dp_meta_objset;
776773

module/zfs/dsl_dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2310,6 +2310,7 @@ dsl_dir_activity_in_progress(dsl_dir_t *dd, dsl_dataset_t *ds,
23102310
break;
23112311

23122312
if (dmu_objset_type(os) != DMU_OST_ZFS ||
2313+
dmu_objset_get_user(os) == NULL ||
23132314
zfs_get_vfs_flag_unmounted(os)) {
23142315
*in_progress = B_FALSE;
23152316
return (0);
@@ -2392,5 +2393,4 @@ dsl_dir_cancel_waiters(dsl_dir_t *dd)
23922393
#if defined(_KERNEL)
23932394
EXPORT_SYMBOL(dsl_dir_set_quota);
23942395
EXPORT_SYMBOL(dsl_dir_set_reservation);
2395-
EXPORT_SYMBOL(dsl_dir_cancel_waiters);
23962396
#endif

module/zfs/zfs_ioctl.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4126,17 +4126,12 @@ zfs_ioc_wait_fs(const char *name, nvlist_t *innvl, nvlist_t *outnvl)
41264126
if ((error = dsl_pool_hold(name, FTAG, &dp)) != 0)
41274127
return (error);
41284128

4129-
if ((error = dsl_dir_hold(dp, name, FTAG, &dd, NULL)) != 0) {
4129+
if ((error = dsl_dataset_hold(dp, name, FTAG, &ds)) != 0) {
41304130
dsl_pool_rele(dp, FTAG);
41314131
return (error);
41324132
}
41334133

4134-
if ((error = dsl_dataset_hold_obj(dd->dd_pool,
4135-
dsl_dir_phys(dd)->dd_head_dataset_obj, FTAG, &ds)) != 0) {
4136-
dsl_pool_rele(dp, FTAG);
4137-
dsl_dir_rele(dd, FTAG);
4138-
return (error);
4139-
}
4134+
dd = ds->ds_dir;
41404135
mutex_enter(&dd->dd_activity_lock);
41414136
dd->dd_activity_count++;
41424137

0 commit comments

Comments
 (0)