block: Fix null_blk_zoned creation failure with small number of zones

null_blk_zoned creation fails if the number of zones specified is equal to or is
smaller than 64 due to a memory allocation failure in blk_alloc_zones(). With
such a small number of zones, the required memory size for all zones descriptors
fits in a single page, and the page order for alloc_pages_node() is zero. Allow
this value in blk_alloc_zones() for the allocation to succeed.

Fixes: bf5054569653 "block: Introduce blk_revalidate_disk_zones()"
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by Shin'ichiro Kawasaki and committed by Jens Axboe 927b6b2d a538e3ff

Changed files
+1 -1
block
+1 -1
block/blk-zoned.c
··· 378 378 struct page *page; 379 379 int order; 380 380 381 - for (order = get_order(size); order > 0; order--) { 381 + for (order = get_order(size); order >= 0; order--) { 382 382 page = alloc_pages_node(node, GFP_NOIO | __GFP_ZERO, order); 383 383 if (page) { 384 384 *nr_zones = min_t(unsigned int, *nr_zones,