scsi: Make scsi_mq_prep_fn() call scsi_init_command()
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 2 Jun 2017 21:22:00 +0000 (14:22 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 01:01:37 +0000 (21:01 -0400)
commit08f784364fef627650e471c7ae342f1da1c57bbf
tree60bb90495d2b40869bd8c71494b7bda5034764a2
parentbe4c186c80113f95a5946594687a8e70f876e857
scsi: Make scsi_mq_prep_fn() call scsi_init_command()

This patch reduces code duplication. There are two functional changes in
this patch:

- It causes scsi_mq_prep_fn() to clear driver-private command data, just
  like the already upstream commit 1bad6c4a57ef ("scsi: zero per-cmd
  private driver data for each MQ I/O").

- The initialization of .prot_sdb is moved from scsi_mq_prep_fn() into
  scsi_init_request().

[mkp: applied by hand]

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c