svn commit: r225174 - projects/zfsd/head/sys/cam/scsi

Alexander Motin mav at FreeBSD.org
Thu Aug 25 11:39:32 UTC 2011


Author: mav
Date: Thu Aug 25 11:39:32 2011
New Revision: 225174
URL: http://svn.freebsd.org/changeset/base/225174

Log:
  Drop the periph lock during M_WAITOK buffer allocation.

Modified:
  projects/zfsd/head/sys/cam/scsi/scsi_enc.c

Modified: projects/zfsd/head/sys/cam/scsi/scsi_enc.c
==============================================================================
--- projects/zfsd/head/sys/cam/scsi/scsi_enc.c	Thu Aug 25 11:02:01 2011	(r225173)
+++ projects/zfsd/head/sys/cam/scsi/scsi_enc.c	Thu Aug 25 11:39:32 2011	(r225174)
@@ -744,8 +744,11 @@ enc_fsm_step(enc_softc_t *enc)
 	cur_state = &enc->enc_fsm_states[enc->current_action];
 
 	buf = NULL;
-	if (cur_state->buf_size != 0)
+	if (cur_state->buf_size != 0) {
+		cam_periph_unlock(enc->periph);
 		buf = malloc(cur_state->buf_size, M_SCSIENC, M_WAITOK|M_ZERO);
+		cam_periph_lock(enc->periph);
+	}
 
 	error = 0;
 	ccb   = NULL;


More information about the svn-src-projects mailing list