Re: [PATCH v3 8/9] vfs: open inside ->tmpfile()

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

 



On Wed, 21 Sept 2022 at 11:08, Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> On Tue, Sep 20, 2022 at 09:36:31PM +0200, Miklos Szeredi wrote:
> > This is in preparation for adding tmpfile support to fuse, which requires
> > that the tmpfile creation and opening are done as a single operation.
> >
> > Replace the 'struct dentry *' argument of i_op->tmpfile with
> > 'struct file *'.
> >
> > Call finish_open_simple() as the last thing in ->tmpfile() instances (may
> > be omitted in the error case).
> >
> > Change d_tmpfile() argument to 'struct file *' as well to make callers more
> > readable.
> >
> > Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx>
> > ---
>
> Seems fine to me. Fwiw, it feels like all the file->f_path.dentry derefs
> could be wrapped in a helper similar to file_inode(). I know we have
> file_dentry() but that calls d_real() so not sure if that'll be correct
> for all updated callers,

I don't think file_dentry() should be used for this.

file_dentry() is basically a hack for overlayfs's "fake path" thing.
It should only be used where strictly necessary.  At one point it
would be good to look again at cleaning this mess up.

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