diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-02-22 16:36:28 +0100 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-05-08 20:28:19 +0200 |
commit | 832ee62d992d9b2d599a6dc70ac822dec4557ea4 (patch) | |
tree | 80a3da3da9610682c57e834047cd0c36f233dc0f /fs/ext4/inode.c | |
parent | ext4: Use scoped memory APIs in ext4_da_write_begin() (diff) | |
download | linux-832ee62d992d9b2d599a6dc70ac822dec4557ea4.tar.xz linux-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 '')
-rw-r--r-- | fs/ext4/inode.c | 2 |
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) |