diff mbox series

[09/22] ext4: Allow GFP_FS allocations in ext4_da_convert_inline_data_to_extent()

Message ID 20220222194820.737755-10-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Remove aop flags | expand

Commit Message

Matthew Wilcox Feb. 22, 2022, 7:48 p.m. UTC
Since commit 8bc1379b82b8, the transaction is stopped before calling
ext4_da_convert_inline_data_to_extent(), which means we can do GFP_FS
allocations and recurse into the filesystem.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/ext4/inline.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Theodore Ts'o March 8, 2022, 5:12 p.m. UTC | #1
On Tue, Feb 22, 2022 at 07:48:07PM +0000, Matthew Wilcox (Oracle) wrote:
> Since commit 8bc1379b82b8, the transaction is stopped before calling
> ext4_da_convert_inline_data_to_extent(), which means we can do GFP_FS
> allocations and recurse into the filesystem.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Acked-by: Theodore Ts'o <tytso@mit.edu>

(Or would you prefer that I take these through the ext4 tree?)

    	      	     	    	 - Ted
diff mbox series

Patch

diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index e42941803605..7865fe136b66 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -848,13 +848,12 @@  ext4_journalled_write_inline_data(struct inode *inode,
  */
 static int ext4_da_convert_inline_data_to_extent(struct address_space *mapping,
 						 struct inode *inode,
-						 unsigned flags,
 						 void **fsdata)
 {
 	int ret = 0, inline_size;
 	struct page *page;
 
-	page = grab_cache_page_write_begin(mapping, 0, flags);
+	page = grab_cache_page_write_begin(mapping, 0, 0);
 	if (!page)
 		return -ENOMEM;
 
@@ -942,7 +941,6 @@  int ext4_da_write_inline_data_begin(struct address_space *mapping,
 		ext4_journal_stop(handle);
 		ret = ext4_da_convert_inline_data_to_extent(mapping,
 							    inode,
-							    flags,
 							    fsdata);
 		if (ret == -ENOSPC &&
 		    ext4_should_retry_alloc(inode->i_sb, &retries))