From 5f9a15e3634f42727fcf6f0f787d9909ab553ed6 Mon Sep 17 00:00:00 2001 From: mjacob Date: Wed, 27 Oct 1999 21:49:36 +0000 Subject: Mark path for deallocation only *after* you've successfully allocated it. --- sys/cam/scsi/scsi_target.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/cam') diff --git a/sys/cam/scsi/scsi_target.c b/sys/cam/scsi/scsi_target.c index 0a16385..fe188c4 100644 --- a/sys/cam/scsi/scsi_target.c +++ b/sys/cam/scsi/scsi_target.c @@ -625,13 +625,14 @@ targallocinstance(struct ioc_alloc_unit *alloc_unit) alloc_unit->path_id, alloc_unit->target_id, alloc_unit->lun_id); - free_path_on_return++; - if (status != CAM_REQ_CMP) { printf("Couldn't Allocate Path %x\n", status); goto fail; } + free_path_on_return++; + + xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1); cpi.ccb_h.func_code = XPT_PATH_INQ; xpt_action((union ccb *)&cpi); -- cgit v1.1