zfsvfs_setup(): zap_stats_t may have undefined content when accessed (#10398)

Signed-off-by: Allan Jude <allanjude@klarasystems.com>

Co-authored-by: Allan Jude <allanjude@klarasystems.com>
This commit is contained in:
Brian Behlendorf 2020-06-05 17:21:04 -07:00 committed by GitHub
commit 63761a8f1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -878,10 +878,10 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting)
&zs) == 0) {
dataset_kstats_update_nunlinks_kstat(
&zfsvfs->z_kstat, zs.zs_num_entries);
}
dprintf_ds(zfsvfs->z_os->os_dsl_dataset,
"num_entries in unlinked set: %llu",
zs.zs_num_entries);
}
zfs_unlinked_drain(zfsvfs);
dsl_dir_t *dd = zfsvfs->z_os->os_dsl_dataset->ds_dir;
dd->dd_activity_cancelled = B_FALSE;