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
commit832ee62d992d9b2d599a6dc70ac822dec4557ea4 (patch)
tree80a3da3da9610682c57e834047cd0c36f233dc0f /fs/ext4/inode.c
parentext4: Use scoped memory APIs in ext4_da_write_begin() (diff)
downloadlinux-dev-832ee62d992d9b2d599a6dc70ac822dec4557ea4.tar.xz
linux-dev-832ee62d992d9b2d599a6dc70ac822dec4557ea4.zip
ext4: Use scoped memory APIs in ext4_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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 21ebcb3c59ba..01a55647c959 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1156,7 +1156,7 @@ static int ext4_write_begin(struct file *file, struct address_space *mapping,
if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) {
ret = ext4_try_to_write_inline_data(mapping, inode, pos, len,
- flags, pagep);
+ pagep);
if (ret < 0)
return ret;
if (ret == 1)