From c0d232d988604b6200b6af1be08f9bb40823ca5d Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Wed, 21 Oct 2009 15:57:16 +0000 Subject: [PATCH] MFp4: Do not search for bus when it is not needed, --- sys/cam/cam_xpt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 39b25dfa97c5..9afeafa3bf5f 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4148,8 +4148,6 @@ xpt_release_simq(struct cam_sim *sim, int run_queue) 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 @@ -4159,15 +4157,17 @@ xpt_release_simq(struct cam_sim *sim, int run_queue) 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); } } }