Author: mjg
Date: Fri Jan 31 11:31:14 2020
New Revision: 357329
URL: https://svnweb.freebsd.org/changeset/base/357329

Log:
  vfs: revert the overzealous assert added in r357285 to vgone
  
  The intent was to make it more likely to catch filesystems with custom
  need_inactive routines which fail to call vn_need_pageq_flush (or do an
  equivalent).
  
  One immediate case which is missed is vgone from called by inactive itself.
  
  A better assertion may land later. The routine is not added to vputx because
  it is of no use to tmpfs et al.
  
  Reported by:  syzbot+5f697ec11f89b6094...@syzkaller.appspotmail.com

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c    Fri Jan 31 10:51:13 2020        (r357328)
+++ head/sys/kern/vfs_subr.c    Fri Jan 31 11:31:14 2020        (r357329)
@@ -3862,7 +3862,6 @@ vgonel(struct vnode *vp)
                vinactivef(vp);
                VI_UNLOCK(vp);
        }
-       VNPASS(!vn_need_pageq_flush(vp), vp);
        if (vp->v_type == VSOCK)
                vfs_unp_reclaim(vp);
 
@@ -4994,7 +4993,7 @@ vn_need_pageq_flush(struct vnode *vp)
        struct vm_object *obj;
        int need;
 
-       VNPASS(VN_IS_DOOMED(vp) || mtx_owned(VI_MTX(vp)), vp);
+       MPASS(mtx_owned(VI_MTX(vp)));
        need = 0;
        if ((obj = vp->v_object) != NULL && (vp->v_vflag & VV_NOSYNC) == 0 &&
            vm_object_mightbedirty(obj))
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to