From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Change truncate page allocation to be GFP_NOFS
Date: Tue, 20 Mar 2012 11:37:05 +0000 [thread overview]
Message-ID: <1332243425.2764.36.camel@menhir> (raw)
In-Reply-To: <a98ddbbc-3f78-4d0e-8703-859e08e07634@zmail12.collab.prod.int.phx2.redhat.com>
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;
>
>
prev parent reply other threads:[~2012-03-20 11:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <28c800d7-cfa2-4149-8437-dbd5217c5e5c@zmail12.collab.prod.int.phx2.redhat.com>
2012-03-19 19:25 ` [Cluster-devel] [GFS2 PATCH] GFS2: Change truncate page allocation to be GFP_NOFS Bob Peterson
2012-03-20 11:37 ` Steven Whitehouse [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1332243425.2764.36.camel@menhir \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).