“cb669ca5701153a808db6627521cc8aa52fc42d1”上不存在“fs/xfs/xfs_buf.c”
提交 5cc28a9e 编写于 作者: D Dmitry Monakhov 提交者: Theodore Ts'o

ext4: prevent fsreentrance deadlock for inline_data

ext4_da_convert_inline_data_to_extent() invokes
grab_cache_page_write_begin().  grab_cache_page_write_begin performs
memory allocation, so fs-reentrance should be prohibited because we
are inside journal transaction.
Signed-off-by: NDmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 d4f76107
...@@ -870,6 +870,12 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping, ...@@ -870,6 +870,12 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,
goto out_journal; goto out_journal;
} }
/*
* We cannot recurse into the filesystem as the transaction
* is already started.
*/
flags |= AOP_FLAG_NOFS;
if (ret == -ENOSPC) { if (ret == -ENOSPC) {
ret = ext4_da_convert_inline_data_to_extent(mapping, ret = ext4_da_convert_inline_data_to_extent(mapping,
inode, inode,
...@@ -882,11 +888,6 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping, ...@@ -882,11 +888,6 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,
goto out; goto out;
} }
/*
* We cannot recurse into the filesystem as the transaction
* is already started.
*/
flags |= AOP_FLAG_NOFS;
page = grab_cache_page_write_begin(mapping, 0, flags); page = grab_cache_page_write_begin(mapping, 0, flags);
if (!page) { if (!page) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册