Both of these locations are called while a transaction is in progress. Starting a transaction uses memalloc_nofs_save(), so we are already prevented from recursing into the filesystem and using GFP_NOFS was unnecessary. Signed-off-by: Matthew Wilcox (Oracle) --- fs/ext4/inline.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c index ceee69a66482..1884abb09614 100644 --- a/fs/ext4/inline.c +++ b/fs/ext4/inline.c @@ -601,9 +601,7 @@ static int ext4_convert_inline_data_to_extent(struct address_space *mapping, goto out; } - /* We cannot recurse into the filesystem as the transaction is already - * started */ - folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN | FGP_NOFS, + folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN, mapping_gfp_mask(mapping)); if (IS_ERR(folio)) { ret = PTR_ERR(folio); @@ -734,7 +732,7 @@ int ext4_generic_write_inline_data(struct address_space *mapping, goto out_release_bh; } - folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN | FGP_NOFS, + folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN, mapping_gfp_mask(mapping)); if (IS_ERR(folio)) { ret = PTR_ERR(folio); -- 2.47.3