diff options
author | Christoph Hellwig <hch@lst.de> | 2020-11-24 09:43:52 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-12-01 14:53:39 -0700 |
commit | 3f50b95e0edd22824b2650eb65466bf7060f7488 (patch) | |
tree | 68a3627b4333ce3ec210893945a253db1c4d3b12 /block/ioctl.c | |
parent | b601d148a16ea16dfbaf3600be35ee175847a09b (diff) | |
download | linux-3f50b95e0edd22824b2650eb65466bf7060f7488.tar.bz2 |
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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/ioctl.c')
-rw-r--r-- | block/ioctl.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/block/ioctl.c b/block/ioctl.c index 6b785181344f..0c09bb7a6ff3 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -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 */ |