Commit 4c94dece1baf320d925cedb231489c4e0358ac5a

Authored by Tejun Heo
Committed by Jens Axboe
1 parent 9fd8d0e1bc

block: don't init rq fields unnecessarily

blk_get_request() always returns properly zeroed requests.  Don't set
fields to zero/NULL unnecessarily.

[ Impact: cleanup ]

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>

Showing 1 changed file with 0 additions and 2 deletions Side-by-side Diff

... ... @@ -500,8 +500,6 @@
500 500  
501 501 rq = blk_get_request(q, WRITE, __GFP_WAIT);
502 502 rq->cmd_type = REQ_TYPE_BLOCK_PC;
503   - rq->data_len = 0;
504   - rq->extra_len = 0;
505 503 rq->timeout = BLK_DEFAULT_SG_TIMEOUT;
506 504 rq->cmd[0] = cmd;
507 505 rq->cmd[4] = data;