On Thu, Jan 9, 2025 at 7:59 PM Isaac J. Manjarres <isaacmanjarres@xxxxxxxxxx> 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@xxxxxxxxxx> This looks reasonable to me. One nit below, but: Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx> > 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