Re: [PATCH] jbd: Use printk_ratelimit() injournal_alloc_journal_head()

From: Jan Kara
Date: Mon Oct 04 2010 - 05:44:30 EST


On Mon 04-10-10 18:17:14, Namhyung Kim wrote:
> #ifdef CONFIG_JBD_DEBUG
> atomic_inc(&nr_journal_heads);
> @@ -1726,11 +1725,10 @@ 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)) {
> + if (printk_ratelimit())
> printk(KERN_NOTICE "ENOMEM in %s, retrying.\n",
> __func__);
> - last_warning = jiffies;
> - }
> +
OK, but can we convert this directly to printk_ratelimited please?
Thanks.

Honza

--
Jan Kara <jack@xxxxxxx>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/