diff options
author | Bob Peterson <rpeterso@redhat.com> | 2012-03-19 23:25:50 +0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-03-20 15:05:00 +0400 |
commit | 220cca2a4f5867db595135e0450381032eb54902 (patch) | |
tree | c8b0f7dd3e5a49a3cc18c981f3e6087849be98c4 /fs/gfs2/bmap.c | |
parent | 58a7d5fb8e31279b992db4027e44b053a84b7344 (diff) | |
download | linux-220cca2a4f5867db595135e0450381032eb54902.tar.xz |
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 <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 14a704015970..197c5c47e577 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -60,7 +60,7 @@ static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, int release = 0; if (!page || page->index) { - page = grab_cache_page(inode->i_mapping, 0); + page = find_or_create_page(inode->i_mapping, 0, GFP_NOFS); if (!page) return -ENOMEM; release = 1; @@ -930,7 +930,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping, loff_t from) struct page *page; int err; - page = grab_cache_page(mapping, index); + page = find_or_create_page(mapping, index, GFP_NOFS); if (!page) return 0; |