git: d8a096621bcf - main - sync_vnode(): add assert to check vn_start_write() correctness
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 18 Apr 2023 23:22:06 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d8a096621bcf4539d0920eb0711d19fcb30c0576 commit d8a096621bcf4539d0920eb0711d19fcb30c0576 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-04-15 19:41:44 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-04-18 23:21:40 +0000 sync_vnode(): add assert to check vn_start_write() correctness Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 60d3a71667a1..475467da3c34 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -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);