buffer: hoist GFP flags from grow_dev_page() to __getblk_gfp()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 14 Sep 2023 15:00:05 +0000 (16:00 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:32:28 +0000 (10:32 -0700)
commit3ed65f04aac4d1cd025f30ee3fac174bcbf2b018
treea9ff3d53f9ecccbe486141d76c22de4ec855517f
parent2a41815784e029cbef571511384f00fa40f2a82e
buffer: hoist GFP flags from grow_dev_page() to __getblk_gfp()

grow_dev_page() is only called by grow_buffers().  grow_buffers() is only
called by __getblk_slow() and __getblk_slow() is only called from
__getblk_gfp(), so it is safe to move the GFP flags setting all the way
up.  With that done, add a new bdev_getblk() entry point that leaves the
GFP flags the way the caller specified them.

[willy@infradead.org: fix grow_dev_page() error handling]
Link: https://lkml.kernel.org/r/ZRREEIwqiy5DijKB@casper.infradead.org
Link: https://lkml.kernel.org/r/20230914150011.843330-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Hui Zhu <teawater@antgroup.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/buffer.c
include/linux/buffer_head.h