]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - block/blk-zoned.c
block: Limit allocation of zone descriptors for report zones
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 12 Oct 2018 10:08:44 +0000 (19:08 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 25 Oct 2018 17:17:40 +0000 (11:17 -0600)
commit2e85fbaff3a71e46038ec736186c42ffa721c775
tree09f8f2e909939e916a95e92ac59a8921758cac74
parenta91e138022bc29b5d2bbc56b41de3e0db6261e28
block: Limit allocation of zone descriptors for report zones

There is no point in allocating more zone descriptors than the number of
zones a block device has for doing a zone report. Avoid doing that in
blkdev_report_zones_ioctl() by limiting the number of zone decriptors
allocated internally to process the user request.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-zoned.c