From f820bc079f5c632f6e19ce360e64c7f37aceb857 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Mon, 17 Aug 2009 09:13:22 +0000 Subject: [PATCH] Fix panic in zfs recv code. The last vnode (mountpoint's vnode) can have 0 usecount. Reported by: Thomas Backman Approved by: re (kib) --- sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c index a2bf4608d46f..16c6683b7afe 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c @@ -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);