Add a missing unlock.
This commit is contained in:
parent
508897dfcc
commit
7e2dabf972
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wd.c,v 1.135 1995/03/29 23:36:27 mycroft Exp $ */
|
||||
/* $NetBSD: wd.c,v 1.136 1995/04/01 10:31:40 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -873,8 +873,10 @@ wdopen(dev, flag, fmt)
|
||||
* If any partition is open, but the disk has been invalidated,
|
||||
* disallow further opens.
|
||||
*/
|
||||
if ((wd->sc_flags & WDF_LOADED) == 0)
|
||||
return ENXIO;
|
||||
if ((wd->sc_flags & WDF_LOADED) == 0) {
|
||||
error = EIO;
|
||||
goto bad3;
|
||||
}
|
||||
} else {
|
||||
if ((wd->sc_flags & WDF_LOADED) == 0) {
|
||||
wd->sc_flags |= WDF_LOADED;
|
||||
@ -921,6 +923,7 @@ bad:
|
||||
if (wd->sc_dk.dk_openmask == 0) {
|
||||
}
|
||||
|
||||
bad3:
|
||||
wdunlock(wd);
|
||||
return error;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wd.c,v 1.135 1995/03/29 23:36:27 mycroft Exp $ */
|
||||
/* $NetBSD: wd.c,v 1.136 1995/04/01 10:31:40 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -873,8 +873,10 @@ wdopen(dev, flag, fmt)
|
||||
* If any partition is open, but the disk has been invalidated,
|
||||
* disallow further opens.
|
||||
*/
|
||||
if ((wd->sc_flags & WDF_LOADED) == 0)
|
||||
return ENXIO;
|
||||
if ((wd->sc_flags & WDF_LOADED) == 0) {
|
||||
error = EIO;
|
||||
goto bad3;
|
||||
}
|
||||
} else {
|
||||
if ((wd->sc_flags & WDF_LOADED) == 0) {
|
||||
wd->sc_flags |= WDF_LOADED;
|
||||
@ -921,6 +923,7 @@ bad:
|
||||
if (wd->sc_dk.dk_openmask == 0) {
|
||||
}
|
||||
|
||||
bad3:
|
||||
wdunlock(wd);
|
||||
return error;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd.c,v 1.65 1995/03/29 23:04:39 mycroft Exp $ */
|
||||
/* $NetBSD: cd.c,v 1.66 1995/04/01 10:29:41 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -257,8 +257,10 @@ cdopen(dev, flag, fmt)
|
||||
* If any partition is open, but the disk has been invalidated,
|
||||
* disallow further opens.
|
||||
*/
|
||||
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0)
|
||||
return ENXIO;
|
||||
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
|
||||
error = EIO;
|
||||
goto bad3;
|
||||
}
|
||||
} else {
|
||||
/* Check that it is still responding and ok. */
|
||||
if (error = scsi_test_unit_ready(sc_link,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sd.c,v 1.65 1995/03/29 23:04:52 mycroft Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.66 1995/04/01 10:29:48 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -263,8 +263,10 @@ sdopen(dev, flag, fmt)
|
||||
* If any partition is open, but the disk has been invalidated,
|
||||
* disallow further opens.
|
||||
*/
|
||||
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0)
|
||||
return ENXIO;
|
||||
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
|
||||
error = EIO;
|
||||
goto bad3;
|
||||
}
|
||||
} else {
|
||||
/* Check that it is still responding and ok. */
|
||||
if (error = scsi_test_unit_ready(sc_link,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cd.c,v 1.65 1995/03/29 23:04:39 mycroft Exp $ */
|
||||
/* $NetBSD: cd.c,v 1.66 1995/04/01 10:29:41 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -257,8 +257,10 @@ cdopen(dev, flag, fmt)
|
||||
* If any partition is open, but the disk has been invalidated,
|
||||
* disallow further opens.
|
||||
*/
|
||||
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0)
|
||||
return ENXIO;
|
||||
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
|
||||
error = EIO;
|
||||
goto bad3;
|
||||
}
|
||||
} else {
|
||||
/* Check that it is still responding and ok. */
|
||||
if (error = scsi_test_unit_ready(sc_link,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sd.c,v 1.65 1995/03/29 23:04:52 mycroft Exp $ */
|
||||
/* $NetBSD: sd.c,v 1.66 1995/04/01 10:29:48 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved.
|
||||
@ -263,8 +263,10 @@ sdopen(dev, flag, fmt)
|
||||
* If any partition is open, but the disk has been invalidated,
|
||||
* disallow further opens.
|
||||
*/
|
||||
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0)
|
||||
return ENXIO;
|
||||
if ((sc_link->flags & SDEV_MEDIA_LOADED) == 0) {
|
||||
error = EIO;
|
||||
goto bad3;
|
||||
}
|
||||
} else {
|
||||
/* Check that it is still responding and ok. */
|
||||
if (error = scsi_test_unit_ready(sc_link,
|
||||
|
Loading…
Reference in New Issue
Block a user