]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
block: ensure bdi->io_pages is always initialized
authorJens Axboe <axboe@kernel.dk>
Mon, 31 Aug 2020 17:20:02 +0000 (11:20 -0600)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Thu, 17 Sep 2020 06:47:07 +0000 (00:47 -0600)
commit4f74f2f2b4e4a06639a0b6a861b9ccc6ecfcd9fb
tree3b47f5b088a7134ca34086558ecf11e16e7b9964
parent62f98feb1a150b142dde77b61abe3cd6b64276b2
block: ensure bdi->io_pages is always initialized

BugLink: https://bugs.launchpad.net/bugs/1895880
commit de1b0ee490eafdf65fac9eef9925391a8369f2dc upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
block/blk-core.c