svn commit: r189242 - in stable/7/sys: . cam/scsi contrib/pf
dev/ath/ath_hal dev/cxgb
Scott Long
scottl at FreeBSD.org
Sun Mar 1 08:31:36 PST 2009
Author: scottl
Date: Sun Mar 1 16:31:35 2009
New Revision: 189242
URL: http://svn.freebsd.org/changeset/base/189242
Log:
Merge 182433: Fix locking mistake in the da driver.
Modified:
stable/7/sys/ (props changed)
stable/7/sys/cam/scsi/scsi_da.c
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/dev/ath/ath_hal/ (props changed)
stable/7/sys/dev/cxgb/ (props changed)
Modified: stable/7/sys/cam/scsi/scsi_da.c
==============================================================================
--- stable/7/sys/cam/scsi/scsi_da.c Sun Mar 1 16:28:17 2009 (r189241)
+++ stable/7/sys/cam/scsi/scsi_da.c Sun Mar 1 16:31:35 2009 (r189242)
@@ -674,18 +674,19 @@ daopen(struct disk *dp)
softc->disk->d_fwheads = softc->params.heads;
softc->disk->d_devstat->block_size = softc->params.secsize;
softc->disk->d_devstat->flags &= ~DEVSTAT_BS_UNAVAILABLE;
- }
-
- if (error == 0) {
+
if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0 &&
(softc->quirks & DA_Q_NO_PREVENT) == 0)
daprevent(periph, PR_PREVENT);
- } else {
+ } else
softc->flags &= ~DA_FLAG_OPEN;
- cam_periph_release(periph);
- }
+
cam_periph_unhold(periph);
cam_periph_unlock(periph);
+
+ if (error != 0) {
+ cam_periph_release(periph);
+ }
return (error);
}
More information about the svn-src-all
mailing list