public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jose R. Santos" <jrs@us.ibm.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH] ext4: improve ext4_fill_flex_info() a bit
Date: Thu, 24 Jul 2008 12:09:38 -0500	[thread overview]
Message-ID: <20080724120938.59bd2220@ichigo> (raw)
In-Reply-To: <4887DB2C.1080403@cn.fujitsu.com>

On Thu, 24 Jul 2008 09:30:20 +0800
Li Zefan <lizf@cn.fujitsu.com> wrote:

> - use kzalloc() instead of kmalloc() + memset()
> - improve a printk info

Nicer - Thanks

Acked-by: Jose R. Santos <jrs@us.ibm.com>

> 
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
> ---
>  fs/ext4/super.c |    7 +++----
>  1 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 1cb371d..33eab31 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1506,14 +1506,13 @@ static int ext4_fill_flex_info(struct super_block *sb)
> 
>  	flex_group_count = (sbi->s_groups_count + groups_per_flex - 1) /
>  		groups_per_flex;
> -	sbi->s_flex_groups = kmalloc(flex_group_count *
> +	sbi->s_flex_groups = kzalloc(flex_group_count *
>  				     sizeof(struct flex_groups), GFP_KERNEL);
>  	if (sbi->s_flex_groups == NULL) {
> -		printk(KERN_ERR "EXT4-fs: not enough memory\n");
> +		printk(KERN_ERR "EXT4-fs: not enough memory for "
> +				"%lu flex groups\n", flex_group_count);
>  		goto failed;
>  	}
> -	memset(sbi->s_flex_groups, 0, flex_group_count *
> -	       sizeof(struct flex_groups));
> 
>  	gdp = ext4_get_group_desc(sb, 1, &bh);
>  	block_bitmap = ext4_block_bitmap(sb, gdp) - 1;

  reply	other threads:[~2008-07-24 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-24  1:30 [PATCH] ext4: improve ext4_fill_flex_info() a bit Li Zefan
2008-07-24 17:09 ` Jose R. Santos [this message]
2008-07-24 18:25   ` Theodore Tso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080724120938.59bd2220@ichigo \
    --to=jrs@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox