lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 4 Oct 2010 12:31:45 +0200
From:	Jan Kara <jack@...e.cz>
To:	Namhyung Kim <namhyung@...il.com>
Cc:	Jan Kara <jack@...e.cz>, Andrew Morton <akpm@...ux-foundation.org>,
	linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH UPDATED] jbd: Use printk_ratelimited() in
 journal_alloc_journal_head()

On Mon 04-10-10 19:12:13, Namhyung Kim wrote:
> Use printk_ratelimited() instead of doing it manually.
  Thanks. I've merged the patch into my tree.

								Honza

> 
> Signed-off-by: Namhyung Kim <namhyung@...il.com>
> ---
>  fs/jbd/journal.c |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
> index 6f20a75..f79767d 100644
> --- a/fs/jbd/journal.c
> +++ b/fs/jbd/journal.c
> @@ -1718,7 +1718,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);
> @@ -1726,11 +1725,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);
> -- 
> 1.7.0.4
> 
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists