diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2022-09-24 07:00:00 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2022-09-24 07:00:00 +0200 |
commit | 863f144f12add1f4eab80b70561a90857c524a8b (patch) | |
tree | e537ccaee9ef0a552e610024357cfa5ad53b5516 /Documentation/filesystems/locking.rst | |
parent | vfs: move open right after ->tmpfile() (diff) | |
download | linux-863f144f12add1f4eab80b70561a90857c524a8b.tar.xz linux-863f144f12add1f4eab80b70561a90857c524a8b.zip |
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>
Diffstat (limited to 'Documentation/filesystems/locking.rst')
-rw-r--r-- | Documentation/filesystems/locking.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/filesystems/locking.rst b/Documentation/filesystems/locking.rst index 4bb2627026ec..8f737e76935c 100644 --- a/Documentation/filesystems/locking.rst +++ b/Documentation/filesystems/locking.rst @@ -79,7 +79,8 @@ prototypes:: int (*atomic_open)(struct inode *, struct dentry *, struct file *, unsigned open_flag, umode_t create_mode); - int (*tmpfile) (struct inode *, struct dentry *, umode_t); + int (*tmpfile) (struct user_namespace *, struct inode *, + struct file *, umode_t); int (*fileattr_set)(struct user_namespace *mnt_userns, struct dentry *dentry, struct fileattr *fa); int (*fileattr_get)(struct dentry *dentry, struct fileattr *fa); |