[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140527175755.GV18016@ZenIV.linux.org.uk>
Date: Tue, 27 May 2014 18:57:55 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Miklos Szeredi <miklos@...redi.hu>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] vfs: fix vmplice_to_user()
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@...redi.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...
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists