ocfs2: Fix deadlock when allocating page
authorJan Kara <jack@suse.cz>
Tue, 24 Aug 2010 12:28:03 +0000 (14:28 +0200)
committerTao Ma <tao.ma@oracle.com>
Wed, 8 Sep 2010 06:25:57 +0000 (14:25 +0800)
We cannot call grab_cache_page() when holding filesystem locks or with
a transaction started as grab_cache_page() calls page allocation with
GFP_KERNEL flag and thus page reclaim can recurse back into the filesystem
causing deadlocks or various assertion failures. We have to use
find_or_create_page() instead and pass it GFP_NOFS as we do with other
allocations.

Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Tao Ma <tao.ma@oracle.com>

No differences found