aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-04-29 03:54:35 -0400
committerJens Axboe <jens.axboe@oracle.com>2008-04-29 08:48:54 -0400
commit4917fa292558593d36b2880977ea206f7727dbe5 (patch)
tree5ef03fba3ca3f3b1f615e9d558f7138619787d3a /drivers/scsi/sd.c
parent6f6a036e6e061563efecb61505fc4cc3ca415f80 (diff)
block: no need to initialize rq->cmd in prepare_flush_fn hook
The block layer initializes rq->cmd (queue_flush calls rq_init) so prepare_flush_fn hooks don't need to do that. The purpose of this patch is to remove sizeof(rq->cmd), as a preparation for large command support, which changes rq->cmd from the static array to a pointer. sizeof(rq->cmd) will not make sense. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3cea17dd5dba..01cefbb2d539 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -860,7 +860,6 @@ static int sd_sync_cache(struct scsi_disk *sdkp)
860 860
861static void sd_prepare_flush(struct request_queue *q, struct request *rq) 861static void sd_prepare_flush(struct request_queue *q, struct request *rq)
862{ 862{
863 memset(rq->cmd, 0, sizeof(rq->cmd));
864 rq->cmd_type = REQ_TYPE_BLOCK_PC; 863 rq->cmd_type = REQ_TYPE_BLOCK_PC;
865 rq->timeout = SD_TIMEOUT; 864 rq->timeout = SD_TIMEOUT;
866 rq->cmd[0] = SYNCHRONIZE_CACHE; 865 rq->cmd[0] = SYNCHRONIZE_CACHE;