ext4: Fix deadlock in ext4_write_begin() and ext4_da_write_begin()
authorJan Kara <jack@suse.cz>
Mon, 23 Feb 2009 02:09:59 +0000 (21:09 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 23 Feb 2009 02:09:59 +0000 (21:09 -0500)
commitebd3610b110bbb18ea6f9f2aeed1e1068c537227
treea7ecd4c6ef1d05619abeefea831e8f73ffadda11
parent05bf9e839d9de4e8a094274a0a2fd07beb47eaf1
ext4: Fix deadlock in ext4_write_begin() and ext4_da_write_begin()

Functions ext4_write_begin() and ext4_da_write_begin() call
grab_cache_page_write_begin() without AOP_FLAG_NOFS. Thus it
can happen that page reclaim is triggered in that function
and it recurses back into the filesystem (or some other filesystem).
But this can lead to various problems as a transaction is already
started at that point. Add the necessary flag.

http://bugzilla.kernel.org/show_bug.cgi?id=11688

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/inode.c