From owner-svn-src-all@FreeBSD.ORG Sun Jul 8 18:04:27 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 543711065678; Sun, 8 Jul 2012 18:04:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7B58FC17; Sun, 8 Jul 2012 18:04:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q68I4QgW066625; Sun, 8 Jul 2012 18:04:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q68I4QFO066623; Sun, 8 Jul 2012 18:04:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201207081804.q68I4QFO066623@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 8 Jul 2012 18:04:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238258 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 18:04:27 -0000 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 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; } /*