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
This commit is contained in:
kib 2019-10-23 07:36:26 +00:00
parent 6b5b767237
commit b382fb1fa5

View File

@ -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