public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reiserfs: use __GFP_NOFAIL instead of yield and retry loop for allocation
@ 2006-01-13  7:33 Pekka J Enberg
  2006-01-13  7:42 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Pekka J Enberg @ 2006-01-13  7:33 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, reiserfs-dev

From: Pekka Enberg <penberg@cs.helsinki.fi>

This patch replaces yield and retry loop with __GFP_NOFAIL in
alloc_journal_list(). Compile-tested only.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---

 fs/reiserfs/journal.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Index: 2.6/fs/reiserfs/journal.c
===================================================================
--- 2.6.orig/fs/reiserfs/journal.c
+++ 2.6/fs/reiserfs/journal.c
@@ -2446,12 +2446,8 @@ static int journal_read(struct super_blo
 static struct reiserfs_journal_list *alloc_journal_list(struct super_block *s)
 {
 	struct reiserfs_journal_list *jl;
-      retry:
-	jl = kzalloc(sizeof(struct reiserfs_journal_list), GFP_NOFS);
-	if (!jl) {
-		yield();
-		goto retry;
-	}
+	jl = kzalloc(sizeof(struct reiserfs_journal_list),
+		     GFP_NOFS | __GFP_NOFAIL);
 	INIT_LIST_HEAD(&jl->j_list);
 	INIT_LIST_HEAD(&jl->j_working_list);
 	INIT_LIST_HEAD(&jl->j_tail_bh_list);

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

end of thread, other threads:[~2006-01-13 21:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-13  7:33 [PATCH] reiserfs: use __GFP_NOFAIL instead of yield and retry loop for allocation Pekka J Enberg
2006-01-13  7:42 ` Andrew Morton
2006-01-13  7:46   ` Pekka J Enberg
2006-01-13  7:55     ` Andrew Morton
2006-01-13 21:44       ` Hans Reiser

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