linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiaying Zhang <jiayingz@google.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	tytso@mit.edu, c@google.com
Subject: Re: [PATCH] EXT4: move aio completion after unwritten extent conversion
Date: Mon, 28 Jun 2010 11:41:13 -0700	[thread overview]
Message-ID: <AANLkTiknqxzwfBROKMAu5v6-059skAFGEqQIw7IIW1kr@mail.gmail.com> (raw)
In-Reply-To: <20100628144956.GA21331@infradead.org>

On Mon, Jun 28, 2010 at 7:49 AM, Christoph Hellwig <hch@infradead.org> wrote:
>
> >       if (io_end->flag != EXT4_IO_UNWRITTEN){
> >               ext4_free_io_end(io_end);
> >               iocb->private = NULL;
> > -             goto out;
> > +out:
> > +             if (is_async)
> > +                     aio_complete(iocb, ret, 0);
> > +             return;
>
> I'd suggest keeping the out label at the end of the function.  Without
> that the code gets unreadable very quickly.
>
I am fine with either. Having the 'out' exit label here saves us a jump in the
common code path while keeping it at the end of the function comply better
with the kernel code style. I will let Ted decide which one to take.

> >       io_end->size = size;
> > -     io_end->flag = EXT4_IO_UNWRITTEN;
>
> Why is this initialization removed?
>
This change is not related to the bug fix. I just realized that this
initialization seems to be unnecessary because we should already
return in the case that (io_end->flag != EXT4_IO_UNWRITTEN)
at the beginning of the function.
--
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

      reply	other threads:[~2010-06-28 18:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24 22:15 [PATCH] EXT4: move aio completion after unwritten extent conversion Jiaying Zhang
2010-06-28 14:49 ` Christoph Hellwig
2010-06-28 18:41   ` Jiaying Zhang [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=AANLkTiknqxzwfBROKMAu5v6-059skAFGEqQIw7IIW1kr@mail.gmail.com \
    --to=jiayingz@google.com \
    --cc=c@google.com \
    --cc=hch@infradead.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).