aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/inode.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-02-22 10:36:28 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-08 14:28:19 -0400
commit36d116e99da7e45c8827a157a0a92da0fbbfcaa2 (patch)
treeb0c671e85fb0dd8c9444b41592b3a3938200d396 /fs/ext4/inode.c
parentext4: Use scoped memory API in mext_page_double_lock() (diff)
downloadlinux-dev-36d116e99da7e45c8827a157a0a92da0fbbfcaa2.tar.xz
linux-dev-36d116e99da7e45c8827a157a0a92da0fbbfcaa2.zip
ext4: Use scoped memory APIs in ext4_da_write_begin()
Instead of setting AOP_FLAG_NOFS, use memalloc_nofs_save() and memalloc_nofs_restore() to prevent GFP_FS allocations recursing into the filesystem with a journal already started. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Acked-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/inode.c')
-rw-r--r--fs/ext4/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 646ece9b3455..21ebcb3c59ba 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2954,8 +2954,7 @@ static int ext4_da_write_begin(struct file *file, struct address_space *mapping,
trace_ext4_da_write_begin(inode, pos, len, flags);
if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
- ret = ext4_da_write_inline_data_begin(mapping, inode,
- pos, len, flags,
+ ret = ext4_da_write_inline_data_begin(mapping, inode, pos, len,
pagep, fsdata);
if (ret < 0)
return ret;