mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
fs: drop GFP_NOFAIL mode from alloc_page_buffers
There is only one called of alloc_page_buffers and it doesn't require __GFP_NOFAIL so drop this allocation mode. Signed-off-by: Michal Hocko <mhocko@suse.com> Link: https://lore.kernel.org/r/20240829130640.1397970-1-mhocko@kernel.org Acked-by: Song Liu <song@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
parent
459ca85ae1
commit
5c40e050e6
@ -360,7 +360,7 @@ static int read_file_page(struct file *file, unsigned long index,
|
||||
pr_debug("read bitmap file (%dB @ %llu)\n", (int)PAGE_SIZE,
|
||||
(unsigned long long)index << PAGE_SHIFT);
|
||||
|
||||
bh = alloc_page_buffers(page, blocksize, false);
|
||||
bh = alloc_page_buffers(page, blocksize);
|
||||
if (!bh) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
@ -957,12 +957,9 @@ no_grow:
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(folio_alloc_buffers);
|
||||
|
||||
struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size,
|
||||
bool retry)
|
||||
struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size)
|
||||
{
|
||||
gfp_t gfp = GFP_NOFS | __GFP_ACCOUNT;
|
||||
if (retry)
|
||||
gfp |= __GFP_NOFAIL;
|
||||
|
||||
return folio_alloc_buffers(page_folio(page), size, gfp);
|
||||
}
|
||||
|
@ -199,8 +199,7 @@ void folio_set_bh(struct buffer_head *bh, struct folio *folio,
|
||||
unsigned long offset);
|
||||
struct buffer_head *folio_alloc_buffers(struct folio *folio, unsigned long size,
|
||||
gfp_t gfp);
|
||||
struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size,
|
||||
bool retry);
|
||||
struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size);
|
||||
struct buffer_head *create_empty_buffers(struct folio *folio,
|
||||
unsigned long blocksize, unsigned long b_state);
|
||||
void end_buffer_read_sync(struct buffer_head *bh, int uptodate);
|
||||
|
Loading…
Reference in New Issue
Block a user