Re: [PATCH] fs: use helpers for opening kernel internal files

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

 



On Thu, Jun 15, 2023 at 7:26 AM Christoph Hellwig <hch@xxxxxx> wrote:
>
> On Wed, Jun 14, 2023 at 03:09:17PM +0300, Amir Goldstein wrote:
> > Overlayfs and cachefiles use vfs_open_tmpfile() to open a tmpfile
> > without accounting for nr_files.
> >
> > Rename this helper to kernel_tmpfile_open() to better reflect this
> > helper is used for kernel internal users.
> >
> > cachefiles uses open_with_fake_path() without the need for a fake path
> > only to use the noaccount feature of open_with_fake_path().
> >
> > Fork open_with_fake_path() to kernel_file_open() which only does the
> > noaccount feature and use it in cachefiles.
>
> Please split this into two patches, one for the
> vfs_tmpfile_open rename, and one for the kernel_file_open helper.
>
> > +EXPORT_SYMBOL(kernel_file_open);
>
> EXPORT_SYMBOL_GPL, please.

Hmm. Technically, the renamed symbol {vfs,kernel}_tmpfile_open is a
new symbol so we can make it EXPORT_SYMBOL_GPL too.
The only users should be overlayfs and cachefiles.

I had already posted v5 without changing it, but if you think that is right,
I can ask Christian to change that on commit.

Thanks,
Amir.




[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