From 220cca2a4f5867db595135e0450381032eb54902 Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Mon, 19 Mar 2012 15:25:50 -0400 Subject: GFS2: Change truncate page allocation to be GFP_NOFS This patch changes the page allocation in gfs2_block_truncate_page and two others to GFP_NOFS to avoid deadlock in low-memory conditions. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse --- fs/gfs2/quota.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/gfs2/quota.c') diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index a45b21b03915..4856c66640bf 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -681,7 +681,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc, ptr = qp; nbytes = sizeof(struct gfs2_quota); get_a_page: - page = grab_cache_page(mapping, index); + page = find_or_create_page(mapping, index, GFP_NOFS); if (!page) return -ENOMEM; -- cgit v1.2.3-70-g09d2