Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern reassignbuf(), brelvp(): VI_WRMAPDIRTY is always cl...
details: https://anonhg.NetBSD.org/src/rev/f78c3d591ef6
branches: trunk
changeset: 745425:f78c3d591ef6
user: ad <ad%NetBSD.org@localhost>
date: Sun Mar 01 21:39:07 2020 +0000
description:
reassignbuf(), brelvp(): VI_WRMAPDIRTY is always clear if the object has no
pages, so assert that instead of trying to clear it.
diffstat:
sys/kern/vfs_subr.c | 19 ++++---------------
1 files changed, 4 insertions(+), 15 deletions(-)
diffs (47 lines):
diff -r ed0689a3b084 -r f78c3d591ef6 sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c Sun Mar 01 21:37:26 2020 +0000
+++ b/sys/kern/vfs_subr.c Sun Mar 01 21:39:07 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_subr.c,v 1.482 2020/02/27 22:12:54 ad Exp $ */
+/* $NetBSD: vfs_subr.c,v 1.483 2020/03/01 21:39:07 ad Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008, 2019, 2020
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.482 2020/02/27 22:12:54 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.483 2020/03/01 21:39:07 ad Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -423,12 +423,7 @@
if ((vp->v_iflag & (VI_ONWORKLST | VI_PAGES)) == VI_ONWORKLST &&
LIST_FIRST(&vp->v_dirtyblkhd) == NULL) {
- /*
- * Okay to clear VI_WRMAPDIRTY without the uvm_object locked
- * here, because new pages can't be inserted without first
- * taking v_interlock (which is held here).
- */
- vp->v_iflag &= ~VI_WRMAPDIRTY;
+ KASSERT((vp->v_iflag & VI_WRMAPDIRTY) == 0);
vn_syncer_remove_from_worklist(vp);
}
@@ -469,13 +464,7 @@
if ((vp->v_iflag & (VI_ONWORKLST | VI_PAGES)) ==
VI_ONWORKLST &&
LIST_FIRST(&vp->v_dirtyblkhd) == NULL) {
- /*
- * Okay to clear VI_WRMAPDIRTY without the
- * uvm_object locked here, because new pages can't
- * be inserted without first taking v_interlock
- * (which is held here).
- */
- vp->v_iflag &= ~VI_WRMAPDIRTY;
+ KASSERT((vp->v_iflag & VI_WRMAPDIRTY) == 0);
vn_syncer_remove_from_worklist(vp);
}
} else {
Home |
Main Index |
Thread Index |
Old Index