diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2010-09-04 21:35:59 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2010-09-04 21:35:59 +0000 |
commit | a1a7ffe8d6492c421846f4481a42ee6ad08fb638 (patch) | |
tree | 14439df99c4db5727d68dde8429acf62cf361170 /sys/ntfs/ntfs_vfsops.c | |
parent | 4890afe69020fe918091de424fbecba5d6bd83cc (diff) |
revert previous "simplification". kcornies at gmail says it doesn't work.
Diffstat (limited to 'sys/ntfs/ntfs_vfsops.c')
-rw-r--r-- | sys/ntfs/ntfs_vfsops.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/ntfs/ntfs_vfsops.c b/sys/ntfs/ntfs_vfsops.c index a23f681402c..cbc05b179f9 100644 --- a/sys/ntfs/ntfs_vfsops.c +++ b/sys/ntfs/ntfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ntfs_vfsops.c,v 1.20 2010/08/22 21:23:07 tedu Exp $ */ +/* $OpenBSD: ntfs_vfsops.c,v 1.21 2010/09/04 21:35:58 tedu Exp $ */ /* $NetBSD: ntfs_vfsops.c,v 1.7 2003/04/24 07:50:19 christos Exp $ */ /*- @@ -68,6 +68,13 @@ #include <ntfs/ntfsmount.h> #endif +#ifdef MALLOC_DEFINE +MALLOC_DEFINE(M_NTFSMNT, "NTFS mount", "NTFS mount structure"); +MALLOC_DEFINE(M_NTFSNTNODE,"NTFS ntnode", "NTFS ntnode information"); +MALLOC_DEFINE(M_NTFSFNODE,"NTFS fnode", "NTFS fnode information"); +MALLOC_DEFINE(M_NTFSDIR,"NTFS dir", "NTFS dir buffer"); +#endif + #if defined(__FreeBSD__) static int ntfs_mount(struct mount *, char *, caddr_t, struct nameidata *, struct proc *); @@ -143,6 +150,7 @@ ntfs_init ( struct vfsconf *vcp ) { ntfs_nthashinit(); + ntfs_toupper_init(); return 0; } @@ -404,14 +412,14 @@ ntfs_mountfs(devvp, mp, argsp, p) /* read the Unicode lowercase --> uppercase translation table, * if necessary */ - if ((error = ntfs_load_toupper(mp, ntmp))) + if ((error = ntfs_toupper_use(mp, ntmp, p))) goto out1; /* * Scan $BitMap and count free clusters */ error = ntfs_calccfree(ntmp, &ntmp->ntm_cfree); - if (error) + if(error) goto out1; /* @@ -561,6 +569,9 @@ ntfs_unmount( vput(ntmp->ntm_devvp); + /* free the toupper table, if this has been last mounted ntfs volume */ + ntfs_toupper_unuse(p); + dprintf(("ntfs_umount: freeing memory...\n")); mp->mnt_data = NULL; mp->mnt_flag &= ~MNT_LOCAL; |