Do not expose unlocked unconstructed nullfs vnode on mount list.
Lock the native nullfs vnode lock before switching the locks. Tested by: pho MFC after: 1 week
This commit is contained in:
parent
1e0f75d313
commit
66f02f4b25
@ -172,12 +172,12 @@ static void
|
||||
null_destroy_proto(struct vnode *vp, void *xp)
|
||||
{
|
||||
|
||||
lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL);
|
||||
VI_LOCK(vp);
|
||||
vp->v_data = NULL;
|
||||
vp->v_vnlock = &vp->v_lock;
|
||||
vp->v_op = &dead_vnodeops;
|
||||
VI_UNLOCK(vp);
|
||||
(void) vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||
vgone(vp);
|
||||
vput(vp);
|
||||
free(xp, M_NULLFSNODE);
|
||||
|
Loading…
Reference in New Issue
Block a user