summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2024-01-09 12:13:14 +0100
committerJan Kara <jack@suse.cz>2024-01-23 19:21:10 +0100
commitdbc056f83b6711f6361bb0831bea4654b8d9e892 (patch)
tree77eb2da75318510dace9950b93af4b160fd47a1c
parentudf: Remove GFP_NOFS allocation in udf_expand_file_adinicb() (diff)
downloadlinux-dbc056f83b6711f6361bb0831bea4654b8d9e892.tar.xz
linux-dbc056f83b6711f6361bb0831bea4654b8d9e892.zip
ext2: Drop GFP_NOFS allocation from ext2_init_block_alloc_info()
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>
-rw-r--r--fs/ext2/balloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index e124f3d709b2..1bfd6ab11038 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -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;