diff options
author | Tejun Heo <tj@kernel.org> | 2009-05-07 09:24:35 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-11 03:50:53 -0400 |
commit | 53d6979ab6747e758207e8ac861b96d0da0d3332 (patch) | |
tree | f95147fe83e984a1311db3da47d8d12b9ecbbf01 /drivers | |
parent | f68adec3c7155a8bbf32a90cb4c4d0737df045d9 (diff) |
nbd: don't clear rq->sector and nr_sectors unnecessarily
There's no reason to clear rq->sector and nr_sectors after calling
blk_rq_init(). They're guaranteed to be clear. Drop unnecessary
clearing.
[ Impact: cleanup ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/nbd.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 4d6de4f15ccb..a9ab8be9d92f 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c | |||
@@ -580,13 +580,6 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *lo, | |||
580 | blk_rq_init(NULL, &sreq); | 580 | blk_rq_init(NULL, &sreq); |
581 | sreq.cmd_type = REQ_TYPE_SPECIAL; | 581 | sreq.cmd_type = REQ_TYPE_SPECIAL; |
582 | nbd_cmd(&sreq) = NBD_CMD_DISC; | 582 | nbd_cmd(&sreq) = NBD_CMD_DISC; |
583 | /* | ||
584 | * Set these to sane values in case server implementation | ||
585 | * fails to check the request type first and also to keep | ||
586 | * debugging output cleaner. | ||
587 | */ | ||
588 | sreq.sector = 0; | ||
589 | sreq.nr_sectors = 0; | ||
590 | if (!lo->sock) | 583 | if (!lo->sock) |
591 | return -EINVAL; | 584 | return -EINVAL; |
592 | nbd_send_req(lo, &sreq); | 585 | nbd_send_req(lo, &sreq); |