aboutsummaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorGravatar Miklos Szeredi <mszeredi@redhat.com> 2024-05-02 20:35:57 +0200
committerGravatar Miklos Szeredi <mszeredi@redhat.com> 2024-05-02 20:35:57 +0200
commit9a87907de3597a339cc129229d1a20bc7365ea5f (patch)
treea3a6e2b3784ee2e895ceb5668ca5bb1de754b1fa /fs/namei.c
parentLinux 6.9-rc5 (diff)
downloadlinux-9a87907de3597a339cc129229d1a20bc7365ea5f.tar.gz
linux-9a87907de3597a339cc129229d1a20bc7365ea5f.tar.bz2
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 'fs/namei.c')
-rw-r--r--fs/namei.c6
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);