svn commit: r353916 - head/sys/vm

Konstantin Belousov kib at FreeBSD.org
Wed Oct 23 07:36:27 UTC 2019


Author: kib
Date: Wed Oct 23 07:36:26 2019
New Revision: 353916
URL: https://svnweb.freebsd.org/changeset/base/353916

Log:
  Assert that vm_fault_lock_vnode() returns locked saved vnode.
  
  Reviewed by:	alc, markj
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks
  Differential revision:	https://reviews.freebsd.org/D22113

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Wed Oct 23 03:25:32 2019	(r353915)
+++ head/sys/vm/vm_fault.c	Wed Oct 23 07:36:26 2019	(r353916)
@@ -637,8 +637,10 @@ vm_fault_lock_vnode(struct faultstate *fs)
 	if (fs->object->type != OBJT_VNODE)
 		return (KERN_SUCCESS);
 	vp = fs->object->handle;
-	if (vp == fs->vp)
+	if (vp == fs->vp) {
+		ASSERT_VOP_LOCKED(vp, "saved vnode is not locked");
 		return (KERN_SUCCESS);
+	}
 
 	/*
 	 * Perform an unlock in case the desired vnode changed while


More information about the svn-src-head mailing list