* [Cluster-devel] [GFS2 PATCH] GFS2: Change truncate page allocation to be GFP_NOFS [not found] <28c800d7-cfa2-4149-8437-dbd5217c5e5c@zmail12.collab.prod.int.phx2.redhat.com> @ 2012-03-19 19:25 ` Bob Peterson 2012-03-20 11:37 ` Steven Whitehouse 0 siblings, 1 reply; 2+ messages in thread From: Bob Peterson @ 2012-03-19 19:25 UTC (permalink / raw) To: cluster-devel.redhat.com 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; ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [GFS2 PATCH] GFS2: Change truncate page allocation to be GFP_NOFS 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 0 siblings, 0 replies; 2+ messages in thread From: Steven Whitehouse @ 2012-03-20 11:37 UTC (permalink / raw) To: cluster-devel.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; > > ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-03-20 11:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 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).