Fix panic in zfs recv code. The last vnode (mountpoint's vnode) can have

0 usecount.

Reported by:	Thomas Backman <serenity@exscape.org>
Approved by:	re (kib)
This commit is contained in:
Pawel Jakub Dawidek 2009-08-17 09:13:22 +00:00
parent 159ef108e1
commit f820bc079f

View File

@ -917,7 +917,7 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting)
for (zp = list_head(&zfsvfs->z_all_znodes); zp != NULL;
zp = list_next(&zfsvfs->z_all_znodes, zp))
if (zp->z_dbuf) {
ASSERT(ZTOV(zp)->v_count > 0);
ASSERT(ZTOV(zp)->v_count >= 0);
zfs_znode_dmu_fini(zp);
}
mutex_exit(&zfsvfs->z_znodes_lock);