From 600ed71d22a7604814e6535225dd0b6ef9bd18df Mon Sep 17 00:00:00 2001 From: Namhyung Kim Date: Mon, 4 Oct 2010 19:12:13 +0900 Subject: [PATCH] --- yaml --- r: 218827 b: refs/heads/master c: f81e3d4564a06c5a070337ba527d11865acecb67 h: refs/heads/master i: 218825: 9b550f96913679047b198bc15ef005bbfa08b62a 218823: 0e17fa704cbefd88573d179d209ec8fe7b4692d8 v: v3 --- [refs] | 2 +- trunk/fs/jbd/journal.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index d8ad943822f1..c8afae83b2bb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c5639bef63a241d8d5a00e5243d7f304d7563c46 +refs/heads/master: f81e3d4564a06c5a070337ba527d11865acecb67 diff --git a/trunk/fs/jbd/journal.c b/trunk/fs/jbd/journal.c index 2c4b1f109da9..d7a86935553a 100644 --- a/trunk/fs/jbd/journal.c +++ b/trunk/fs/jbd/journal.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -1719,7 +1720,6 @@ static void journal_destroy_journal_head_cache(void) static struct journal_head *journal_alloc_journal_head(void) { struct journal_head *ret; - static unsigned long last_warning; #ifdef CONFIG_JBD_DEBUG atomic_inc(&nr_journal_heads); @@ -1727,11 +1727,9 @@ static struct journal_head *journal_alloc_journal_head(void) ret = kmem_cache_alloc(journal_head_cache, GFP_NOFS); if (ret == NULL) { jbd_debug(1, "out of memory for journal_head\n"); - if (time_after(jiffies, last_warning + 5*HZ)) { - printk(KERN_NOTICE "ENOMEM in %s, retrying.\n", - __func__); - last_warning = jiffies; - } + printk_ratelimited(KERN_NOTICE "ENOMEM in %s, retrying.\n", + __func__); + while (ret == NULL) { yield(); ret = kmem_cache_alloc(journal_head_cache, GFP_NOFS);