aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-10-29 04:02:15 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-29 04:02:20 -0400
commit9de09ace8d518141a4375e1d216ab64db4377799 (patch)
treeda8e7a77f4ea91eb3bb73fc6da72ecf8c99e1c16 /drivers/scsi/scsi.c
parent1beee96bae0daf7f491356777c3080cc436950f5 (diff)
parent6d3f1e12f46a2f9a1bb7e7aa433df8dd31ce5647 (diff)
Merge branch 'tracing/urgent' into tracing/core
Merge reason: Pick up fixes and move base from -rc1 to -rc5. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/scsi/scsi.c')
-rw-r--r--drivers/scsi/scsi.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index b6e03074cb8f..dd098cad337b 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -241,10 +241,7 @@ scsi_host_alloc_command(struct Scsi_Host *shost, gfp_t gfp_mask)
241 */ 241 */
242struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask) 242struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask)
243{ 243{
244 struct scsi_cmnd *cmd; 244 struct scsi_cmnd *cmd = scsi_host_alloc_command(shost, gfp_mask);
245 unsigned char *buf;
246
247 cmd = scsi_host_alloc_command(shost, gfp_mask);
248 245
249 if (unlikely(!cmd)) { 246 if (unlikely(!cmd)) {
250 unsigned long flags; 247 unsigned long flags;
@@ -258,9 +255,15 @@ struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost, gfp_t gfp_mask)
258 spin_unlock_irqrestore(&shost->free_list_lock, flags); 255 spin_unlock_irqrestore(&shost->free_list_lock, flags);
259 256
260 if (cmd) { 257 if (cmd) {
258 void *buf, *prot;
259
261 buf = cmd->sense_buffer; 260 buf = cmd->sense_buffer;
261 prot = cmd->prot_sdb;
262
262 memset(cmd, 0, sizeof(*cmd)); 263 memset(cmd, 0, sizeof(*cmd));
264
263 cmd->sense_buffer = buf; 265 cmd->sense_buffer = buf;
266 cmd->prot_sdb = prot;
264 } 267 }
265 } 268 }
266 269