Use readlocking now that assertions on vm_page_lookup() are relaxed.
Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: flo, pho
This commit is contained in:
parent
155b65a40f
commit
bd997a13e8
@ -2772,7 +2772,7 @@ inmem(struct vnode * vp, daddr_t blkno)
|
||||
size = vp->v_mount->mnt_stat.f_iosize;
|
||||
off = (vm_ooffset_t)blkno * (vm_ooffset_t)vp->v_mount->mnt_stat.f_iosize;
|
||||
|
||||
VM_OBJECT_WLOCK(obj);
|
||||
VM_OBJECT_RLOCK(obj);
|
||||
for (toff = 0; toff < vp->v_mount->mnt_stat.f_iosize; toff += tinc) {
|
||||
m = vm_page_lookup(obj, OFF_TO_IDX(off + toff));
|
||||
if (!m)
|
||||
@ -2784,11 +2784,11 @@ inmem(struct vnode * vp, daddr_t blkno)
|
||||
(vm_offset_t) ((toff + off) & PAGE_MASK), tinc) == 0)
|
||||
goto notinmem;
|
||||
}
|
||||
VM_OBJECT_WUNLOCK(obj);
|
||||
VM_OBJECT_RUNLOCK(obj);
|
||||
return 1;
|
||||
|
||||
notinmem:
|
||||
VM_OBJECT_WUNLOCK(obj);
|
||||
VM_OBJECT_RUNLOCK(obj);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user