mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
sync_vnode(): add assert to check vn_start_write() correctness
Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
da86e7a20d
commit
d8a096621b
1 changed files with 3 additions and 0 deletions
|
|
@ -2659,6 +2659,9 @@ sync_vnode(struct synclist *slp, struct bufobj **bo, struct thread *td)
|
|||
mtx_lock(&sync_mtx);
|
||||
return (*bo == LIST_FIRST(slp));
|
||||
}
|
||||
MPASSERT(mp == NULL || (curthread->td_pflags & TDP_IGNSUSP) != 0 ||
|
||||
(mp->mnt_kern_flag & MNTK_SUSPENDED) == 0, mp,
|
||||
("suspended mp syncing vp %p", vp));
|
||||
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
|
||||
(void) VOP_FSYNC(vp, MNT_LAZY, td);
|
||||
VOP_UNLOCK(vp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue