ext2: Drop GFP_NOFS allocation from ext2_init_block_alloc_info()
authorJan Kara <jack@suse.cz>
Tue, 9 Jan 2024 11:13:14 +0000 (12:13 +0100)
committerJan Kara <jack@suse.cz>
Tue, 23 Jan 2024 18:21:10 +0000 (19:21 +0100)
The allocation happens under inode->i_rwsem and
EXT2_I(inode)->i_truncate_mutex. Neither of them is acquired during
direct fs reclaim so the allocation can be changed to GFP_KERNEL.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/ext2/balloc.c

index e124f3d709b23aa6e9d3c128fea4607f4b13f9e7..1bfd6ab110389ad626da04af4e70d127c6f8798e 100644 (file)
@@ -412,7 +412,7 @@ void ext2_init_block_alloc_info(struct inode *inode)
        struct ext2_block_alloc_info *block_i;
        struct super_block *sb = inode->i_sb;
 
-       block_i = kmalloc(sizeof(*block_i), GFP_NOFS);
+       block_i = kmalloc(sizeof(*block_i), GFP_KERNEL);
        if (block_i) {
                struct ext2_reserve_window_node *rsv = &block_i->rsv_window_node;