ext4: add __GFP_NOWARN to GFP_NOWAIT in readahead
authorHugh Dickins <hughd@google.com>
Tue, 24 Oct 2023 06:26:08 +0000 (23:26 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Oct 2023 23:47:14 +0000 (16:47 -0700)
Since commit e509ad4d77e6 ("ext4: use bdev_getblk() to avoid memory
reclaim in readahead path") rightly replaced GFP_NOFAIL allocations by
GFP_NOWAIT allocations, I've occasionally been seeing "page allocation
failure: order:0" warnings under load: all with
ext4_sb_breadahead_unmovable() in the stack.  I don't think those warnings
are of any interest: suppress them with __GFP_NOWARN.

Link: https://lkml.kernel.org/r/7bc6ad16-9a4d-dd90-202e-47d6cbb5a136@google.com
Fixes: e509ad4d77e6 ("ext4: use bdev_getblk() to avoid memory reclaim in readahead path")
Signed-off-by: Hugh Dickins <hughd@google.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Hui Zhu <teawater@antgroup.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ext4/super.c

index c00ec159dea5e089427aa855758d68d653c55a48..56a08fc5c5d524134a50e74a3a229c576531e314 100644 (file)
@@ -262,7 +262,7 @@ struct buffer_head *ext4_sb_bread_unmovable(struct super_block *sb,
 void ext4_sb_breadahead_unmovable(struct super_block *sb, sector_t block)
 {
        struct buffer_head *bh = bdev_getblk(sb->s_bdev, block,
-                       sb->s_blocksize, GFP_NOWAIT);
+                       sb->s_blocksize, GFP_NOWAIT | __GFP_NOWARN);
 
        if (likely(bh)) {
                if (trylock_buffer(bh))