From db27dcc0f0f5d432e8de03d726b02faae305d7c8 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Fri, 17 Feb 2006 18:22:19 +0000 Subject: [PATCH] Check return value from nonblocking call to vn_start_write(). --- sys/vm/vm_pageout.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index f5efd9ff3c9..b5abcebab38 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -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);