On Thu, 29 Sept 2022 at 10:45, David Howells <dhowells@xxxxxxxxxx> wrote: > > Miklos Szeredi <mszeredi@xxxxxxxxxx> wrote: > > > - path.dentry = vfs_tmpfile(&init_user_ns, fan, S_IFREG, O_RDWR); > > Is there any point passing S_IFREG in to vfs_tmpfile()? Can you actually make > a tmpfile that isn't a regular file? No, it can't. The argument is for the create mode, not the type. Seems like the open(O_TMPFILE) path masks out the type in build_open_how(), so passing zero here would make sense. Thanks, Miklos