Check return value from nonblocking call to vn_start_write().

This commit is contained in:
Tor Egge 2006-02-17 18:22:19 +00:00
parent 1493e8838e
commit db27dcc0f0

View File

@ -931,8 +931,14 @@ rescan0:
if (object->type == OBJT_VNODE) {
vp = object->handle;
mp = NULL;
if (vp->v_type == VREG)
vn_start_write(vp, &mp, V_NOWAIT);
if (vp->v_type == VREG &&
vn_start_write(vp, &mp, V_NOWAIT) != 0) {
++pageout_lock_miss;
if (object->flags & OBJ_MIGHTBEDIRTY)
vnodes_skipped++;
VM_OBJECT_UNLOCK(object);
continue;
}
vm_page_unlock_queues();
VI_LOCK(vp);
VM_OBJECT_UNLOCK(object);