linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mingming Cao <cmm@us.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "\"Cédric Augonnet\"" <cedric.augonnet@gmail.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-ext4@vger.kernel.org
Subject: Re: [EXT4 set 6][PATCH 1/1]Export jbd stats through procfs
Date: Tue, 10 Jul 2007 22:21:42 -0400	[thread overview]
Message-ID: <1184120502.20193.41.camel@localhost.localdomain> (raw)
In-Reply-To: <20070710214221.26539eb6.akpm@linux-foundation.org>

On Tue, 2007-07-10 at 21:42 -0700, Andrew Morton wrote:
> On Tue, 10 Jul 2007 23:21:49 -0400 "Cédric Augonnet" <cedric.augonnet@gmail.com> wrote:
> 
> > 2007/7/10, Andrew Morton <akpm@linux-foundation.org>:
> > 
> > Hi all,
> > 
> > > > +     size = sizeof(struct transaction_stats_s);
> > > > +     s->stats = kmalloc(size, GFP_KERNEL);
> > > > +     if (s == NULL) {
> > > > +             kfree(s);
> > > > +             return -EIO;
> > >
> > > ENOMEM
> > 
> > I'm sorry if i missed some point, but i just don't see the use of such
> > a kfree here, not sure Andrew meant you should only return ENOMEM
> > instead, but why issuing those kfree(NULL), instead of just a if (!s)
> > return ENOMEM ?
> > 
> 
> You found a bug.  It was meant to be
> 
> 	if (s->stats == NULL)
> 
> 

Thanks, I will make sure this get fixed in ext4 patch queue.

-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2007-07-11  5:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-01  7:38 [EXT4 set 6][PATCH 1/1]Export jbd stats through procfs Mingming Cao
2007-07-01  9:26 ` Jose R. Santos
2007-07-11  2:31 ` Andrew Morton
2007-07-11  3:21   ` Cédric Augonnet
2007-07-11  4:37     ` Alexey Dobriyan
2007-07-11  4:42     ` Andrew Morton
2007-07-11  2:21       ` Mingming Cao [this message]
2007-07-16  8:26       ` Mingming Cao
2007-07-16  8:24   ` Mingming Cao
2007-11-30 23:08 ` Eric Sandeen
2007-12-01  1:22   ` Mingming Cao

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=1184120502.20193.41.camel@localhost.localdomain \
    --to=cmm@us.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=cedric.augonnet@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).