svn commit: r186318 - head/sys/cam
Edward Tomasz Napierala
trasz at FreeBSD.org
Fri Dec 19 14:27:10 UTC 2008
Author: trasz
Date: Fri Dec 19 14:27:10 2008
New Revision: 186318
URL: http://svn.freebsd.org/changeset/base/186318
Log:
Move mtx_assert lower, when we can be sure that the pointer
to the mutex is valid.
Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation
Modified:
head/sys/cam/cam_periph.c
Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c Fri Dec 19 11:07:34 2008 (r186317)
+++ head/sys/cam/cam_periph.c Fri Dec 19 14:27:10 2008 (r186318)
@@ -311,8 +311,6 @@ cam_periph_hold(struct cam_periph *perip
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
@@ -324,6 +322,7 @@ cam_periph_hold(struct cam_periph *perip
return (ENXIO);
mtx = periph->sim->mtx;
+ mtx_assert(mtx, MA_OWNED);
if (mtx == &Giant)
mtx = NULL;
More information about the svn-src-all
mailing list