- Hold the vp lock while accessing v_vflags.
This commit is contained in:
parent
6cb8bf2027
commit
75cabb639a
@ -170,14 +170,11 @@ nullfs_mount(mp, ndp, td)
|
|||||||
* a reference on the root vnode.
|
* a reference on the root vnode.
|
||||||
*/
|
*/
|
||||||
error = null_nodeget(mp, lowerrootvp, &vp);
|
error = null_nodeget(mp, lowerrootvp, &vp);
|
||||||
/*
|
|
||||||
* Unlock the node (either the lower or the alias)
|
|
||||||
*/
|
|
||||||
VOP_UNLOCK(vp, 0, td);
|
|
||||||
/*
|
/*
|
||||||
* Make sure the node alias worked
|
* Make sure the node alias worked
|
||||||
*/
|
*/
|
||||||
if (error) {
|
if (error) {
|
||||||
|
VOP_UNLOCK(vp, 0, td);
|
||||||
vrele(lowerrootvp);
|
vrele(lowerrootvp);
|
||||||
free(xmp, M_NULLFSMNT); /* XXX */
|
free(xmp, M_NULLFSMNT); /* XXX */
|
||||||
return (error);
|
return (error);
|
||||||
@ -187,10 +184,15 @@ nullfs_mount(mp, ndp, td)
|
|||||||
* Keep a held reference to the root vnode.
|
* Keep a held reference to the root vnode.
|
||||||
* It is vrele'd in nullfs_unmount.
|
* It is vrele'd in nullfs_unmount.
|
||||||
*/
|
*/
|
||||||
mp_fixme("Unlocked vflag access");
|
|
||||||
nullm_rootvp = vp;
|
nullm_rootvp = vp;
|
||||||
nullm_rootvp->v_vflag |= VV_ROOT;
|
nullm_rootvp->v_vflag |= VV_ROOT;
|
||||||
xmp->nullm_rootvp = nullm_rootvp;
|
xmp->nullm_rootvp = nullm_rootvp;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Unlock the node (either the lower or the alias)
|
||||||
|
*/
|
||||||
|
VOP_UNLOCK(vp, 0, td);
|
||||||
|
|
||||||
if (NULLVPTOLOWERVP(nullm_rootvp)->v_mount->mnt_flag & MNT_LOCAL)
|
if (NULLVPTOLOWERVP(nullm_rootvp)->v_mount->mnt_flag & MNT_LOCAL)
|
||||||
mp->mnt_flag |= MNT_LOCAL;
|
mp->mnt_flag |= MNT_LOCAL;
|
||||||
mp->mnt_data = (qaddr_t) xmp;
|
mp->mnt_data = (qaddr_t) xmp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user