f2fs: set GFP_NOFS for grab_cache_page
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 9 Oct 2015 22:11:38 +0000 (15:11 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 12 Oct 2015 20:38:03 +0000 (13:38 -0700)
commita56c7c6fb3c60857c1335bcb8b914e6f65655486
treeb05bb39180addddee4376a8e6d6169776375eb62
parent6e2c64ad7cebf8740c5e1241de374c6b6ea80f81
f2fs: set GFP_NOFS for grab_cache_page

For normal inodes, their pages are allocated with __GFP_FS, which can cause
filesystem calls when reclaiming memory.
This can incur a dead lock condition accordingly.

So, this patch addresses this problem by introducing
f2fs_grab_cache_page(.., bool for_write), which calls
grab_cache_page_write_begin() with AOP_FLAG_NOFS.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/dir.c
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.c