vfs: add the missing vnode interlock in vfs_mountroot_shuffle
Around v_mountedhere assignment.
This commit is contained in:
parent
50b07c1f71
commit
0d9e99ce3b
@ -367,10 +367,12 @@ vfs_mountroot_shuffle(struct thread *td, struct mount *mpdevfs)
|
|||||||
error = vinvalbuf(vp, V_SAVE, 0, 0);
|
error = vinvalbuf(vp, V_SAVE, 0, 0);
|
||||||
if (!error) {
|
if (!error) {
|
||||||
cache_purge(vp);
|
cache_purge(vp);
|
||||||
|
VI_LOCK(vp);
|
||||||
mporoot->mnt_vnodecovered = vp;
|
mporoot->mnt_vnodecovered = vp;
|
||||||
vp->v_mountedhere = mporoot;
|
vp->v_mountedhere = mporoot;
|
||||||
strlcpy(mporoot->mnt_stat.f_mntonname,
|
strlcpy(mporoot->mnt_stat.f_mntonname,
|
||||||
fspath, MNAMELEN);
|
fspath, MNAMELEN);
|
||||||
|
VI_UNLOCK(vp);
|
||||||
VOP_UNLOCK(vp);
|
VOP_UNLOCK(vp);
|
||||||
} else
|
} else
|
||||||
vput(vp);
|
vput(vp);
|
||||||
|
Loading…
Reference in New Issue
Block a user