mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 17:30:53 +07:00
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: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
d4f7610743
commit
5cc28a9eaa
@ -870,6 +870,12 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,
|
||||
goto out_journal;
|
||||
}
|
||||
|
||||
/*
|
||||
* We cannot recurse into the filesystem as the transaction
|
||||
* is already started.
|
||||
*/
|
||||
flags |= AOP_FLAG_NOFS;
|
||||
|
||||
if (ret == -ENOSPC) {
|
||||
ret = ext4_da_convert_inline_data_to_extent(mapping,
|
||||
inode,
|
||||
@ -882,11 +888,6 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping,
|
||||
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);
|
||||
if (!page) {
|
||||
|
Loading…
Reference in New Issue
Block a user