Commit 3f50b95e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: remove a superflous check in blkpg_do_ioctl



sector_t is now always a u64, so this check is not needed.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b601d148
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -35,15 +35,6 @@ static int blkpg_do_ioctl(struct block_device *bdev,
	start = p.start >> SECTOR_SHIFT;
	length = p.length >> SECTOR_SHIFT;

	/* check for fit in a hd_struct */
	if (sizeof(sector_t) < sizeof(long long)) {
		long pstart = start, plength = length;

		if (pstart != start || plength != length || pstart < 0 ||
		    plength < 0 || p.pno > 65535)
			return -EINVAL;
	}

	switch (op) {
	case BLKPG_ADD_PARTITION:
		/* check if partition is aligned to blocksize */