Re: [PATCH v4 05/10] cachefiles: use vfs_tmpfile_open() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux