mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] vfs: fix vmplice_to_user()
Date: Tue, 27 May 2014 18:57:55 +0100	[thread overview]
Message-ID: <20140527175755.GV18016@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CA+55aFzY--F_2BiZ4-mkFh+0Oy1SX7nBw7cAsSni_iDOtwU-mw@mail.gmail.com>

On Tue, May 27, 2014 at 10:04:58AM -0700, Linus Torvalds wrote:
> On Tue, May 27, 2014 at 7:41 AM, Miklos Szeredi <miklos@szeredi.hu> wrote:
> >
> > This patch fixes two bugs:
> 
> Mind if I change it to avoid the "goto"? I don't think goto is evil,
> but in this case it doesn't seem to buy anything, except to perhaps
> make the patch a bit smaller at the expense of making the result a bit
> harder to read.
> 
> Replacing the
> 
>    if (ret <= 0)
>       goto out;
> 
> with
> 
>    if (ret > 0) {
>        ...
>    }
> 
> also allows moving the various variable declarations closer to their use.
> 
> So something like the attached..

I'm not sure it's better; I've a pending patch that does combination of
rw_copy_check_uvector() with iov_iter_init(), which means that iov
array will be going to the outer scope anyway...

  reply	other threads:[~2014-05-27 17:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-27 14:41 Miklos Szeredi
2014-05-27 17:04 ` Linus Torvalds
2014-05-27 17:57   ` Al Viro [this message]
2014-05-27 17:51 ` Al Viro
2014-05-27 19:25 George Spelvin

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=20140527175755.GV18016@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®