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:
Konstantin Belousov 2019-10-23 07:36:26 +00:00
parent b3bec79d36
commit 16b0c09225
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353916

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