diff options
author | tegge <tegge@FreeBSD.org> | 2006-02-17 18:22:19 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2006-02-17 18:22:19 +0000 |
commit | 3cf2c022c26b2a90b7581da1688722843d1e77ab (patch) | |
tree | 21016d1a6f86de3a3442b5bbcc479ba8bce3ac49 | |
parent | a5703d86de636f3eebb188d17d008e20ee6f4867 (diff) | |
download | FreeBSD-src-3cf2c022c26b2a90b7581da1688722843d1e77ab.zip FreeBSD-src-3cf2c022c26b2a90b7581da1688722843d1e77ab.tar.gz |
Check return value from nonblocking call to vn_start_write().
-rw-r--r-- | sys/vm/vm_pageout.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index f5efd9f..b5abceb 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); |