public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC 1/1] fs/reiserfs/journal.c: Remove obsolete  __GFP_NOFAIL
@ 2014-03-21 16:18 Fabian Frederick
  2014-03-21 20:00 ` Andrew Morton
  0 siblings, 1 reply; 20+ messages in thread
From: Fabian Frederick @ 2014-03-21 16:18 UTC (permalink / raw)
  To: linux-kernel; +Cc: reiserfs-devel, akpm

Loop around congestion_wait on allocation failure/alloc_journal_list
like already fixed in other FS.

(Does it need returning -ENOMEM after some retries ?)

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/reiserfs/journal.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index fd77703..e8c56a9 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -2487,8 +2487,13 @@ static int journal_read(struct super_block *sb)
 static struct reiserfs_journal_list *alloc_journal_list(struct super_block *s)
 {
 	struct reiserfs_journal_list *jl;
-	jl = kzalloc(sizeof(struct reiserfs_journal_list),
-		     GFP_NOFS | __GFP_NOFAIL);
+
+	do {
+		jl = kzalloc(sizeof(struct reiserfs_journal_list), GFP_NOFS);
+		if (unlikely(!jl))
+			congestion_wait(BLK_RW_ASYNC, HZ/50);
+	} while (!jl)
+
 	INIT_LIST_HEAD(&jl->j_list);
 	INIT_LIST_HEAD(&jl->j_working_list);
 	INIT_LIST_HEAD(&jl->j_tail_bh_list);
-- 
1.8.4.5


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

end of thread, other threads:[~2014-03-27  4:38 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-21 16:18 [RFC 1/1] fs/reiserfs/journal.c: Remove obsolete __GFP_NOFAIL Fabian Frederick
2014-03-21 20:00 ` Andrew Morton
2014-03-21 23:21   ` Fabian Frederick
2014-03-21 23:27     ` Andrew Morton
2014-03-22 17:03   ` tytso
2014-03-22 17:15     ` Andrew Morton
2014-03-22 17:26       ` tytso
2014-03-22 17:32         ` tytso
2014-03-22 17:55           ` Andrew Morton
2014-03-22 18:12             ` tytso
2014-03-22 18:56             ` Joe Perches
2014-03-26  1:07               ` David Rientjes
2014-03-22 19:24             ` Dave Jones
2014-03-26  1:06               ` David Rientjes
2014-03-26  6:19                 ` tytso
2014-03-26  6:32                   ` Andrew Morton
2014-03-26 13:29                     ` tytso
2014-03-27  4:38                       ` David Rientjes
2014-03-22 21:13             ` Fabian Frederick
2014-03-24 14:00   ` One Thousand Gnomes

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