Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53d6979a authored by Tejun Heo's avatar Tejun Heo Committed by Jens Axboe
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Cc: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent f68adec3
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -580,13 +580,6 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *lo,
		blk_rq_init(NULL, &sreq);
		sreq.cmd_type = REQ_TYPE_SPECIAL;
		nbd_cmd(&sreq) = NBD_CMD_DISC;
		/*
		 * Set these to sane values in case server implementation
		 * fails to check the request type first and also to keep
		 * debugging output cleaner.
		 */
		sreq.sector = 0;
		sreq.nr_sectors = 0;
		if (!lo->sock)
			return -EINVAL;
		nbd_send_req(lo, &sreq);