diff options
author | mjacob <mjacob@FreeBSD.org> | 1999-10-27 21:49:36 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 1999-10-27 21:49:36 +0000 |
commit | 5f9a15e3634f42727fcf6f0f787d9909ab553ed6 (patch) | |
tree | 6736fecfc991232ab7da2b635ff8823d7679149c /sys/cam | |
parent | 6c9de8a308160244053b38bad526e9118caa7bc3 (diff) | |
download | FreeBSD-src-5f9a15e3634f42727fcf6f0f787d9909ab553ed6.zip FreeBSD-src-5f9a15e3634f42727fcf6f0f787d9909ab553ed6.tar.gz |
Mark path for deallocation only *after* you've successfully allocated it.
Diffstat (limited to 'sys/cam')
-rw-r--r-- | sys/cam/scsi/scsi_target.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |