diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2008-12-17 10:49:03 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2008-12-17 10:49:03 +0000 |
| commit | 1fa9ee7d60cebb750908f484764617db09f29b76 (patch) | |
| tree | add6f77bf4268f51f0c1d29280a3956466d5fb4b /sys/cam/cam_periph.c | |
| parent | c9d986fe542627e8d24331b1c4eca12ad4f0bf88 (diff) | |
Notes
Diffstat (limited to 'sys/cam/cam_periph.c')
| -rw-r--r-- | sys/cam/cam_periph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 907c80137e5d..26fbc6e8439a 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -311,6 +311,8 @@ cam_periph_hold(struct cam_periph *periph, int priority) struct mtx *mtx; int error; + mtx_assert(periph->sim->mtx, MA_OWNED); + /* * Increment the reference count on the peripheral * while we wait for our lock attempt to succeed @@ -322,8 +324,6 @@ cam_periph_hold(struct cam_periph *periph, int priority) return (ENXIO); mtx = periph->sim->mtx; - mtx_assert(mtx, MA_OWNED); - if (mtx == &Giant) mtx = NULL; |
