public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VM: Fix the gfp_mask in invalidate_complete_page2
@ 2006-10-06 21:37 Trond Myklebust
  2006-10-06 21:49 ` Steve Dickson
  2006-10-10  9:43 ` David Howells
  0 siblings, 2 replies; 16+ messages in thread
From: Trond Myklebust @ 2006-10-06 21:37 UTC (permalink / raw)
  To: Andrew Morton, Steve Dickson; +Cc: linux-kernel

If try_to_release_page() is called with a zero gfp mask, then the
filesystem is effectively denied the possibility of sleeping while
attempting to release the page. There doesn't appear to be any valid
reason why this should be banned, given that we're not calling this from
a memory allocation context.
 
For this reason, change the gfp_mask argument of the call to GFP_KERNEL.
    
Note: I am less sure of what the callers of invalidate_complete_page()
require, and so this patch does not touch that mask.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
diff --git a/mm/truncate.c b/mm/truncate.c
index f4edbc1..49c1ffd 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -302,7 +302,7 @@ invalidate_complete_page2(struct address
 	if (page->mapping != mapping)
 		return 0;
 
-	if (PagePrivate(page) && !try_to_release_page(page, 0))
+	if (PagePrivate(page) && !try_to_release_page(page, GFP_KERNEL))
 		return 0;
 
 	write_lock_irq(&mapping->tree_lock);

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-10-10 13:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-06 21:37 [PATCH] VM: Fix the gfp_mask in invalidate_complete_page2 Trond Myklebust
2006-10-06 21:49 ` Steve Dickson
2006-10-06 22:16   ` Trond Myklebust
2006-10-06 22:19     ` Trond Myklebust
2006-10-06 22:40       ` Andrew Morton
2006-10-06 23:09         ` Steve Dickson
2006-10-06 23:20           ` Andrew Morton
2006-10-07  2:33           ` Andrew Morton
2006-10-10  9:43 ` David Howells
2006-10-10 11:42   ` Trond Myklebust
2006-10-10 12:18     ` Steve Dickson
2006-10-10 12:27       ` Trond Myklebust
2006-10-10 13:22         ` Steve Dickson
2006-10-10 13:32           ` Trond Myklebust
2006-10-10 12:49     ` David Howells
2006-10-10 13:15       ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox