mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 06:14:27 +00:00
- Acquire the vnode interlock prior to dropping the mntvnode_mtx.
- Make a note of the lack of XLOCK protection in this code. We would access a vnode while it is changing identities without Giant.
This commit is contained in:
parent
0c31ea3b2d
commit
bb33b5fabf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120736
|
@ -943,8 +943,9 @@ nfs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct thread *td)
|
|||
if (vp->v_mount != mp)
|
||||
goto loop;
|
||||
vnp = TAILQ_NEXT(vp, v_nmntvnodes);
|
||||
mtx_unlock(&mntvnode_mtx);
|
||||
/* XXX Not obeying XLOCK. */
|
||||
VI_LOCK(vp);
|
||||
mtx_unlock(&mntvnode_mtx);
|
||||
if (VOP_ISLOCKED(vp, NULL) || TAILQ_EMPTY(&vp->v_dirtyblkhd) ||
|
||||
waitfor == MNT_LAZY) {
|
||||
VI_UNLOCK(vp);
|
||||
|
|
Loading…
Reference in a new issue