Don't deref NULL if no charset-conversion is specified.

Return correct vnode in vop_bmap()
This commit is contained in:
phk 2004-12-12 12:02:34 +00:00
parent e37de0d950
commit 60aefa9310
2 changed files with 10 additions and 2 deletions

View File

@ -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;

View File

@ -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)