Date: Sun, 8 Jul 2012 18:04:26 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r238258 - head/sys/vm Message-ID: <201207081804.q68I4QFO066623@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sun Jul 8 18:04:26 2012 New Revision: 238258 URL: http://svn.freebsd.org/changeset/base/238258 Log: Avoid vm page queues lock leak after r238212. Reported and tested by: Michael Butler <imb protected-networks net> Reviewed by: alc Pointy hat to: kib MFC after: 20 days Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Jul 8 18:00:22 2012 (r238257) +++ head/sys/vm/vm_pageout.c Sun Jul 8 18:04:26 2012 (r238258) @@ -1030,7 +1030,6 @@ rescan0: ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; - vm_page_lock_queues(); goto unlock_and_continue; } KASSERT(mp != NULL, @@ -1041,7 +1040,6 @@ rescan0: if (vget(vp, LK_EXCLUSIVE | LK_TIMELOCK, curthread)) { VM_OBJECT_LOCK(object); - vm_page_lock_queues(); ++pageout_lock_miss; if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; @@ -1083,14 +1081,14 @@ rescan0: * be undergoing I/O, so skip it */ if (m->hold_count) { - vm_page_lock_queues(); - queues_locked = TRUE; vm_page_unlock(m); vm_page_requeue(m); if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; goto unlock_and_continue; } + vm_page_unlock_queues(); + queues_locked = FALSE; } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207081804.q68I4QFO066623>