mm/filemap: remove dynamically allocated array from filemap_read
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 24 Feb 2021 20:01:52 +0000 (12:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 24 Feb 2021 21:38:27 +0000 (13:38 -0800)
commit0c7c575df56b957390206deb018c41acbb412159
tree364372b8c895ce3ff142bf406d4bfb0fde60b582
parent3a6bae48390d25a9937978a6c09ccc400b6efcbd
mm/filemap: remove dynamically allocated array from filemap_read

Increasing the batch size runs into diminishing returns.  It's probably
better to make, eg, three calls to filemap_get_pages() than it is to call
into kmalloc().

Link: https://lkml.kernel.org/r/20210122160140.223228-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/filemap.c