diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2024-05-02 20:35:57 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2024-05-02 20:35:57 +0200 |
commit | 9a87907de3597a339cc129229d1a20bc7365ea5f (patch) | |
tree | a3a6e2b3784ee2e895ceb5668ca5bb1de754b1fa /fs/namei.c | |
parent | ed30a4a51bb196781c8058073ea720133a65596f (diff) |
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 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c index c5b2a25be7d0..13e50b0a49d2 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -3668,9 +3668,9 @@ static int do_open(struct nameidata *nd, * On non-idmapped mounts or if permission checking is to be performed on the * raw inode simply pass @nop_mnt_idmap. */ -static int vfs_tmpfile(struct mnt_idmap *idmap, - const struct path *parentpath, - struct file *file, umode_t mode) +int vfs_tmpfile(struct mnt_idmap *idmap, + const struct path *parentpath, + struct file *file, umode_t mode) { struct dentry *child; struct inode *dir = d_inode(parentpath->dentry); |