Improve vnode lock assertions.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
This commit is contained in:
Edward Tomasz Napierala 2019-04-10 10:21:14 +00:00
parent 8942762122
commit b65ca345ef
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346076

View File

@ -658,6 +658,8 @@ __elfN(load_sections)(struct image_params *imgp, const Elf_Ehdr *hdr,
bool first;
int error, i;
ASSERT_VOP_LOCKED(imgp->vp, __func__);
base_addr = 0;
first = true;
@ -924,8 +926,7 @@ __elfN(get_interp)(struct image_params *imgp, const Elf_Phdr *phdr,
KASSERT(phdr->p_type == PT_INTERP,
("%s: p_type %u != PT_INTERP", __func__, phdr->p_type));
KASSERT(VOP_ISLOCKED(imgp->vp),
("%s: vp %p is not locked", __func__, imgp->vp));
ASSERT_VOP_LOCKED(imgp->vp, __func__);
td = curthread;