Don't deref NULL if no charset-conversion is specified.
Return correct vnode in vop_bmap()
This commit is contained in:
parent
e37de0d950
commit
60aefa9310
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user