PERFORCE change 116626 for review
Scott Long
scottl at FreeBSD.org
Tue Mar 27 05:11:33 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=116626
Change 116626 by scottl at scottl-x64 on 2007/03/27 05:10:35
Remove spls from scsi_pass.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pass.c#20 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_pass.c#20 (text+ko) ====
@@ -326,7 +326,6 @@
struct cam_periph *periph;
struct pass_softc *softc;
int error;
- int s;
error = 0; /* default to no error */
@@ -338,9 +337,7 @@
softc = (struct pass_softc *)periph->softc;
- s = splsoftcam();
if (softc->flags & PASS_FLAG_INVALID) {
- splx(s);
cam_periph_unlock(periph);
cam_periph_release(periph);
return(ENXIO);
@@ -351,7 +348,6 @@
*/
error = securelevel_gt(td->td_ucred, 1);
if (error) {
- splx(s);
cam_periph_unlock(periph);
cam_periph_release(periph);
return(error);
@@ -361,7 +357,6 @@
* Only allow read-write access.
*/
if (((flags & FWRITE) == 0) || ((flags & FREAD) == 0)) {
- splx(s);
cam_periph_unlock(periph);
cam_periph_release(periph);
return(EPERM);
@@ -372,14 +367,11 @@
*/
if ((flags & O_NONBLOCK) != 0) {
xpt_print(periph->path, "can't do nonblocking access\n");
- splx(s);
cam_periph_unlock(periph);
cam_periph_release(periph);
return(EINVAL);
}
- splx(s);
-
if ((softc->flags & PASS_FLAG_OPEN) == 0) {
softc->flags |= PASS_FLAG_OPEN;
} else {
@@ -417,18 +409,15 @@
passstart(struct cam_periph *periph, union ccb *start_ccb)
{
struct pass_softc *softc;
- int s;
softc = (struct pass_softc *)periph->softc;
switch (softc->state) {
case PASS_STATE_NORMAL:
- s = splbio();
start_ccb->ccb_h.ccb_type = PASS_CCB_WAITING;
SLIST_INSERT_HEAD(&periph->ccb_list, &start_ccb->ccb_h,
periph_links.sle);
periph->immediate_priority = CAM_PRIORITY_NONE;
- splx(s);
wakeup(&periph->ccb_list);
break;
}
More information about the p4-projects
mailing list