From: Mingming Cao <cmm@us.ibm.com>
To: Shen Feng <shen@cn.fujitsu.com>
Cc: Theodore Tso <tytso@mit.edu>,
akpm@linux-foundation.org, linux-ext4@vger.kernel.org,
linux-fsdevel@vger.kernel.org,
Akira Fujita <a-fujita@rs.jp.nec.com>
Subject: Re: [PATCH]ext4: Fix ext4_mb_init_cache return error
Date: Sun, 01 Jun 2008 19:27:08 -0700 [thread overview]
Message-ID: <1212373628.4368.70.camel@localhost.localdomain> (raw)
In-Reply-To: <484349D5.2020104@cn.fujitsu.com>
On Mon, 2008-06-02 at 09:16 +0800, Shen Feng wrote:
>
> Mingming Cao Wrote:
> > ext4: Fix ext4_mb_init_cache return error
> >
> > From: Mingming Cao <cmm@us.ibm.com>
> >
> > ext4_mb_init_cache() incorrectly always return EIO on success. This
> > causes the caller of ext4_mb_init_cache() fail when it checks
> > the return value.
> >
> > Signed-off-by: Mingming Cao <cmm@us.ibm.com>
> > ---
> > fs/ext4/mballoc.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Index: linux-2.6.26-rc4/fs/ext4/mballoc.c
> > ===================================================================
> > --- linux-2.6.26-rc4.orig/fs/ext4/mballoc.c 2008-06-01 12:55:19.000000000 -0700
> > +++ linux-2.6.26-rc4/fs/ext4/mballoc.c 2008-06-01 12:55:23.000000000 -0700
> > @@ -798,7 +798,7 @@ static int ext4_mb_init_cache(struct pag
> > for (i = 0; i < groups_per_page && bh[i]; i++)
> > wait_on_buffer(bh[i]);
> >
> > - err = -EIO;
> > + err = 0;
> > for (i = 0; i < groups_per_page && bh[i]; i++)
> > if (!buffer_uptodate(bh[i]))
> > goto out;
> >
> >
>
> I think the fix should be
>
> err = -EIO;
> for (i = 0; i < groups_per_page && bh[i]; i++)
> if (!buffer_uptodate(bh[i]))
> goto out;
> + err = 0;
>
> Is that right?
>
you are right, thanks for point this out.
Mingming
> Shen Feng
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2008-06-02 2:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-30 11:17 [RFC][PATCH 0/8]ext4: online defrag (ver 0.9) Akira Fujita
2008-05-30 18:52 ` Mingming
2008-06-01 21:02 ` [PATCH]ext4: Fix ext4_mb_init_cache return error Mingming Cao
2008-06-02 1:16 ` Shen Feng
2008-06-02 2:27 ` Mingming Cao [this message]
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=1212373628.4368.70.camel@localhost.localdomain \
--to=cmm@us.ibm.com \
--cc=a-fujita@rs.jp.nec.com \
--cc=akpm@linux-foundation.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=shen@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