From owner-p4-projects@FreeBSD.ORG Mon Oct 12 09:16:42 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AE11D106568D; Mon, 12 Oct 2009 09:16:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 720981065670 for ; Mon, 12 Oct 2009 09:16:42 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 611EF8FC1B for ; Mon, 12 Oct 2009 09:16:42 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n9C9Gglt088097 for ; Mon, 12 Oct 2009 09:16:42 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n9C9GgVX088095 for perforce@freebsd.org; Mon, 12 Oct 2009 09:16:42 GMT (envelope-from mav@freebsd.org) Date: Mon, 12 Oct 2009 09:16:42 GMT Message-Id: <200910120916.n9C9GgVX088095@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Cc: Subject: PERFORCE change 169418 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2009 09:16:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=169418 Change 169418 by mav@mav_mavtest on 2009/10/12 09:16:05 Look for bus only when it is needed. Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#105 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#105 (text+ko) ==== @@ -4156,8 +4156,6 @@ sendq->qfrozen_cnt--; if (sendq->qfrozen_cnt == 0) { - struct cam_eb *bus; - /* * If there is a timeout scheduled to release this * sim queue, remove it. The queue frozen count is @@ -4167,15 +4165,17 @@ callout_stop(&sim->callout); sim->flags &= ~CAM_SIM_REL_TIMEOUT_PENDING; } - bus = xpt_find_bus(sim->path_id); if (run_queue) { + struct cam_eb *bus; + /* * Now that we are unfrozen run the send queue. */ + bus = xpt_find_bus(sim->path_id); xpt_run_dev_sendq(bus); + xpt_release_bus(bus); } - xpt_release_bus(bus); } } }