mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: James Bottomley <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
6f6a036e6e
commit
4917fa2925
2 changed files with 0 additions and 2 deletions
|
|
@ -860,7 +860,6 @@ static int sd_sync_cache(struct scsi_disk *sdkp)
|
|||
|
||||
static void sd_prepare_flush(struct request_queue *q, struct request *rq)
|
||||
{
|
||||
memset(rq->cmd, 0, sizeof(rq->cmd));
|
||||
rq->cmd_type = REQ_TYPE_BLOCK_PC;
|
||||
rq->timeout = SD_TIMEOUT;
|
||||
rq->cmd[0] = SYNCHRONIZE_CACHE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue