diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 55425a53a72d..1920c78a68f2 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: udf_vfsops.c,v 1.9 2006/08/10 12:39:56 reinoud Exp $ */ +/* $NetBSD: udf_vfsops.c,v 1.10 2006/08/21 22:23:09 reinoud Exp $ */ /* * Copyright (c) 2006 Reinoud Zandijk @@ -36,7 +36,7 @@ #include #ifndef lint -__RCSID("$NetBSD: udf_vfsops.c,v 1.9 2006/08/10 12:39:56 reinoud Exp $"); +__RCSID("$NetBSD: udf_vfsops.c,v 1.10 2006/08/21 22:23:09 reinoud Exp $"); #endif /* not lint */ @@ -213,6 +213,10 @@ free_udf_mountinfo(struct mount *mp) ump = VFSTOUDF(mp); if (ump) { + /* dispose of our descriptor pool */ + pool_destroy(&ump->desc_pool); + + /* clear our data */ mp->mnt_data = NULL; for (i = 0; i < UDF_ANCHORS; i++) MPFREE(ump->anchors[i], M_UDFVOLD); @@ -227,11 +231,6 @@ free_udf_mountinfo(struct mount *mp) MPFREE(ump->vat_table, M_UDFVOLD); MPFREE(ump->sparing_table, M_UDFVOLD); - /* - * Note that the node related (e)fe descriptors pool is - * destroyed already if it was used. - */ - free(ump, M_UDFMNT); } } @@ -433,9 +432,6 @@ udf_unmount(struct mount *mp, int mntflags, struct lwp *l) * VOP_RECLAIM on the nodes themselves. */ - /* dispose of our descriptor pool */ - pool_destroy(&ump->desc_pool); - /* close device */ DPRINTF(VOLUMES, ("closing device\n")); if (mp->mnt_flag & MNT_RDONLY) {