diff options
author | 2024-05-02 20:35:57 +0200 | |
---|---|---|
committer | 2024-05-02 20:35:57 +0200 | |
commit | 9a87907de3597a339cc129229d1a20bc7365ea5f (patch) | |
tree | a3a6e2b3784ee2e895ceb5668ca5bb1de754b1fa /include/linux/backing-file.h | |
parent | Linux 6.9-rc5 (diff) | |
download | wireguard-linux-9a87907de3597a339cc129229d1a20bc7365ea5f.tar.xz wireguard-linux-9a87907de3597a339cc129229d1a20bc7365ea5f.zip |
ovl: implement tmpfile
Combine inode creation with opening a file.
There are six separate objects that are being set up: the backing inode,
dentry and file, and the overlay inode, dentry and file. Cleanup in case
of an error is a bit of a challenge and is difficult to test, so careful
review is needed.
All tmpfile testcases except generic/509 now run/pass, and no regressions
are observed with full xfstests.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'include/linux/backing-file.h')
-rw-r--r-- | include/linux/backing-file.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/backing-file.h b/include/linux/backing-file.h index 3f1fe1774f1b..4b61b0e57720 100644 --- a/include/linux/backing-file.h +++ b/include/linux/backing-file.h @@ -22,6 +22,9 @@ struct backing_file_ctx { struct file *backing_file_open(const struct path *user_path, int flags, const struct path *real_path, const struct cred *cred); +struct file *backing_tmpfile_open(const struct path *user_path, int flags, + const struct path *real_parentpath, + umode_t mode, const struct cred *cred); ssize_t backing_file_read_iter(struct file *file, struct iov_iter *iter, struct kiocb *iocb, int flags, struct backing_file_ctx *ctx); |