FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 03-20-2012, 10:37 AM
Steven Whitehouse
 
Default GFS2: Change truncate page allocation to be GFP_NOFS

Hi,

Now in the -nmw tree, just making the merge window this time,

Steve.

On Mon, 2012-03-19 at 15:25 -0400, Bob Peterson wrote:
> Hi,
>
> This patch changes the page allocation in gfs2_block_truncate_page
> and two others to GFP_NOFS to avoid deadlock in low-memory conditions.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> --
> diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
> index 14a7040..197c5c4 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;
>
> diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
> index a45b21b..4856c66 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;
>
>
 

Thread Tools




All times are GMT. The time now is 09:36 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org