diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index 767c1714a20d..52ba5cb156f3 100644 --- a/sys/fs/ntfs/ntfs_vfsops.c +++ b/sys/fs/ntfs/ntfs_vfsops.c @@ -333,7 +333,10 @@ ntfs_mountfs(devvp, mp, td) /* Copy in the 8-bit to Unicode conversion table */ /* Initialize Unicode to 8-bit table from 8toU table */ ntfs_82u_init(ntmp, cs_local, cs_ntfs); - ntfs_u28_init(ntmp, NULL, cs_local, cs_ntfs); + if (cs_local != NULL && cs_ntfs != NULL) + ntfs_u28_init(ntmp, NULL, cs_local, cs_ntfs); + else + ntfs_u28_init(ntmp, ntmp->ntm_82u, cs_local, cs_ntfs); mp->mnt_data = (qaddr_t)ntmp; diff --git a/sys/fs/ntfs/ntfs_vnops.c b/sys/fs/ntfs/ntfs_vnops.c index 700fd1a0aff4..cf2e17dba0b8 100644 --- a/sys/fs/ntfs/ntfs_vnops.c +++ b/sys/fs/ntfs/ntfs_vnops.c @@ -97,9 +97,14 @@ ntfs_bmap(ap) int *a_runb; } */ *ap; { + struct vnode *vp = ap->a_vp; + struct fnode *fp = VTOF(vp); + struct ntnode *ip = FTONT(fp); + struct ntfsmount *ntmp = ip->i_mp; + dprintf(("ntfs_bmap: vn: %p, blk: %d\n", ap->a_vp,(u_int32_t)ap->a_bn)); if (ap->a_bop != NULL) - *ap->a_bop = &ap->a_vp->v_bufobj; + *ap->a_bop = &ntmp->ntm_devvp->v_bufobj; if (ap->a_bnp != NULL) *ap->a_bnp = ap->a_bn; if (ap->a_runp != NULL)