svn commit: r303291 - in stable/10/sys: kern vm
Konstantin Belousov
kib at FreeBSD.org
Mon Jul 25 13:31:19 UTC 2016
Author: kib
Date: Mon Jul 25 13:31:18 2016
New Revision: 303291
URL: https://svnweb.freebsd.org/changeset/base/303291
Log:
MFC r302567:
In vgonel(), postpone setting BO_DEAD until VOP_RECLAIM() is called,
if vnode is VMIO. For VMIO vnodes, set BO_DEAD in vm_object_terminate().
MFC r302580:
Fix grammar.
Modified:
stable/10/sys/kern/vfs_subr.c
stable/10/sys/vm/vm_object.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/vfs_subr.c
==============================================================================
--- stable/10/sys/kern/vfs_subr.c Mon Jul 25 13:28:59 2016 (r303290)
+++ stable/10/sys/kern/vfs_subr.c Mon Jul 25 13:31:18 2016 (r303291)
@@ -2934,7 +2934,13 @@ vgonel(struct vnode *vp)
TAILQ_EMPTY(&vp->v_bufobj.bo_clean.bv_hd) &&
vp->v_bufobj.bo_clean.bv_cnt == 0,
("vp %p bufobj not invalidated", vp));
- vp->v_bufobj.bo_flag |= BO_DEAD;
+
+ /*
+ * For VMIO bufobj, BO_DEAD is set in vm_object_terminate()
+ * after the object's page queue is flushed.
+ */
+ if (vp->v_bufobj.bo_object == NULL)
+ vp->v_bufobj.bo_flag |= BO_DEAD;
BO_UNLOCK(&vp->v_bufobj);
/*
Modified: stable/10/sys/vm/vm_object.c
==============================================================================
--- stable/10/sys/vm/vm_object.c Mon Jul 25 13:28:59 2016 (r303290)
+++ stable/10/sys/vm/vm_object.c Mon Jul 25 13:31:18 2016 (r303291)
@@ -737,6 +737,10 @@ vm_object_terminate(vm_object_t object)
vinvalbuf(vp, V_SAVE, 0, 0);
+ BO_LOCK(&vp->v_bufobj);
+ vp->v_bufobj.bo_flag |= BO_DEAD;
+ BO_UNLOCK(&vp->v_bufobj);
+
VM_OBJECT_WLOCK(object);
}
More information about the svn-src-stable-10
mailing list