[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4FN1LInPkFBitt2@google.com>
Date: Fri, 10 Jan 2025 08:41:56 -0800
From: Isaac Manjarres <isaacmanjarres@...gle.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: lorenzo.stoakes@...cle.com, Andrew Morton <akpm@...ux-foundation.org>,
kaleshsingh@...gle.com, jstultz@...gle.com, surenb@...gle.com,
kernel-team@...roid.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] mm/memfd: Refactor and cleanup the logic in
memfd_create()
On Fri, Jan 10, 2025 at 10:12:13AM +0100, Alice Ryhl wrote:
> On Thu, Jan 9, 2025 at 7:59 PM Isaac J. Manjarres
> <isaacmanjarres@...gle.com> wrote:
> >
> > memfd_create() is a pretty busy function that could be easier to read
> > if some of the logic was split out into helper functions.
> >
> > Therefore, split the flags sanitization, name allocation, and file
> > structure allocation into their own helper functions.
> >
> > No functional change.
> >
> > Signed-off-by: Isaac J. Manjarres <isaacmanjarres@...gle.com>
>
> This looks reasonable to me. One nit below, but:
>
> Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
>
> > fd_install(fd, file);
> > + /* name is not needed beyond this point. */
> > kfree(name);
> > return fd;
>
> This comment seems superfluous at this point, since kfree(name) is the
> last statement of the function.
>
> Alice
Thanks! I'll go ahead and remove that and send out a new version.
--Isaac
Powered by blists - more mailing lists