block: ensure bdi->io_pages is always initialized
authorJens Axboe <axboe@kernel.dk>
Mon, 31 Aug 2020 17:20:02 +0000 (11:20 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Sep 2020 14:00:14 +0000 (08:00 -0600)
commitde1b0ee490eafdf65fac9eef9925391a8369f2dc
tree3fe4baf216fe5501b96d995b5d3b9603a2d1ec7e
parent5d220bcd378a1de14b9609c2706e041ba62253b6
block: ensure bdi->io_pages is always initialized

If a driver leaves the limit settings as the defaults, then we don't
initialize bdi->io_pages. This means that file systems may need to
work around bdi->io_pages == 0, which is somewhat messy.

Initialize the default value just like we do for ->ra_pages.

Cc: stable@vger.kernel.org
Fixes: 9491ae4aade6 ("mm: don't cap request size based on read-ahead setting")
Reported-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c