]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vfs: open inside ->tmpfile()
authorMiklos Szeredi <mszeredi@redhat.com>
Sat, 24 Sep 2022 05:00:00 +0000 (07:00 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Sat, 24 Sep 2022 05:00:00 +0000 (07:00 +0200)
commit863f144f12add1f4eab80b70561a90857c524a8b
treee537ccaee9ef0a552e610024357cfa5ad53b5516
parent9751b338656f05a0ce918befd5118fcd970c71c6
vfs: open inside ->tmpfile()

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.

Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
19 files changed:
Documentation/filesystems/locking.rst
Documentation/filesystems/porting.rst
Documentation/filesystems/vfs.rst
fs/bad_inode.c
fs/btrfs/inode.c
fs/dcache.c
fs/ext2/namei.c
fs/ext4/namei.c
fs/f2fs/namei.c
fs/hugetlbfs/inode.c
fs/minix/namei.c
fs/namei.c
fs/ramfs/inode.c
fs/ubifs/dir.c
fs/udf/namei.c
fs/xfs/xfs_iops.c
include/linux/dcache.h
include/linux/fs.h
mm/shmem.c