On Thu, May 13, 2021 at 06:06:07PM +0700, Dmitry Kadashev wrote: > Pass in the struct filename pointers instead of the user string, and > update the three callers to do the same. This is heavily based on > commit dbea8d345177 ("fs: make do_renameat2() take struct filename"). > > This behaves like do_unlinkat() and do_renameat2(). > > Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> > Signed-off-by: Dmitry Kadashev <dkadashev@xxxxxxxxx> > --- Independent of the following patches I think this is ok and with do_renameat2() that form of conversion has precedence. Acked-by: Christian Brauner <christian.brauner@xxxxxxxxxx> > fs/internal.h | 1 + > fs/namei.c | 22 ++++++++++++++++------ > 2 files changed, 17 insertions(+), 6 deletions(-) > > diff --git a/fs/internal.h b/fs/internal.h > index 6aeae7ef3380..848e165ef0f1 100644 > --- a/fs/internal.h > +++ b/fs/internal.h > @@ -77,6 +77,7 @@ long do_unlinkat(int dfd, struct filename *name); > int may_linkat(struct user_namespace *mnt_userns, struct path *link); > int do_renameat2(int olddfd, struct filename *oldname, int newdfd, > struct filename *newname, unsigned int flags); > +long do_mkdirat(int dfd, struct filename *name, umode_t mode); (We should probably have all helpers just return either long or int instead of alternating between long and int.)