1 ext4: prevent fsreentrance deadlock for inline_data
3 From: Dmitry Monakhov <dmonakhov@openvz.org>
5 ext4_da_convert_inline_data_to_extent() invokes
6 grab_cache_page_write_begin(). grab_cache_page_write_begin performs
7 memory allocation, so fs-reentrance should be prohibited because we
8 are inside journal transaction.
10 Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 fs/ext4/inline.c | 11 ++++++-----
14 1 file changed, 6 insertions(+), 5 deletions(-)
16 diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
17 index 3ea6269..efdcede 100644
18 --- a/fs/ext4/inline.c
19 +++ b/fs/ext4/inline.c
20 @@ -870,6 +870,12 @@ retry_journal:
25 + * We cannot recurse into the filesystem as the transaction
26 + * is already started.
28 + flags |= AOP_FLAG_NOFS;
31 ret = ext4_da_convert_inline_data_to_extent(mapping,
33 @@ -882,11 +888,6 @@ retry_journal:
38 - * We cannot recurse into the filesystem as the transaction
39 - * is already started.
41 - flags |= AOP_FLAG_NOFS;
43 page = grab_cache_page_write_begin(mapping, 0, flags);