Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Aug 2011 11:39:32 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r225174 - projects/zfsd/head/sys/cam/scsi
Message-ID:  <201108251139.p7PBdWbW002018@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108251139.p7PBdWbW002018>