diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2023-04-15 19:41:44 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2023-04-25 00:27:27 +0000 |
commit | aad9b8f78c311c0ed6182234fe0c441e70f76613 (patch) | |
tree | d61f08d58539adb135b640c05ee64c1e8fdf81a9 | |
parent | 84b812d5b330f6f20477da4f6577c3c84655b0a5 (diff) | |
download | src-aad9b8f78c311c0ed6182234fe0c441e70f76613.tar.gz src-aad9b8f78c311c0ed6182234fe0c441e70f76613.zip |
sync_vnode(): add assert to check vn_start_write() correctness
(cherry picked from commit d8a096621bcf4539d0920eb0711d19fcb30c0576)
-rw-r--r-- | sys/kern/vfs_subr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 7ebd63447caa..672000ded079 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2651,6 +2651,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); |