Module Name: src Committed By: ad Date: Sun Mar 1 21:39:07 UTC 2020
Modified Files: src/sys/kern: vfs_subr.c Log Message: reassignbuf(), brelvp(): VI_WRMAPDIRTY is always clear if the object has no pages, so assert that instead of trying to clear it. To generate a diff of this commit: cvs rdiff -u -r1.482 -r1.483 src/sys/kern/vfs_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.482 src/sys/kern/vfs_subr.c:1.483 --- src/sys/kern/vfs_subr.c:1.482 Thu Feb 27 22:12:54 2020 +++ src/sys/kern/vfs_subr.c Sun Mar 1 21:39:07 2020 @@ -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 @@ brelvp(struct buf *bp) 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 @@ reassignbuf(struct buf *bp, struct vnode 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 {