diff options
author | Jens Axboe <axboe@kernel.dk> | 2020-08-31 20:20:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-09 20:14:29 +0300 |
commit | a7a42c1e5023cdac2bbc1038689509595d279cd2 (patch) | |
tree | be9ca5bae2e7af7f5c4fc504093005592af24e35 /block/blk-core.c | |
parent | b7df98a8b7b8abce596e9696d5c3183fc4c0019d (diff) | |
download | linux-a7a42c1e5023cdac2bbc1038689509595d279cd2.tar.xz |
block: ensure bdi->io_pages is always initialized
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>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 03252af8c82c..619a3dcd3f5e 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -526,6 +526,7 @@ struct request_queue *__blk_alloc_queue(int node_id) goto fail_stats; q->backing_dev_info->ra_pages = VM_READAHEAD_PAGES; + q->backing_dev_info->io_pages = VM_READAHEAD_PAGES; q->backing_dev_info->capabilities = BDI_CAP_CGROUP_WRITEBACK; q->node = node_id; |