aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2023-12-23 20:17:05 +0100
committerChristian Brauner <brauner@kernel.org>2023-12-23 20:50:20 +0100
commit7a18c0fff41ee60438ab2a1837d5b1a73ca2e2dd (patch)
treed5da6a53b7bb039eaaf9e75720a24f4b0a955602 /fs/open.c
parentd9e5d31084b024734e64307521414ef0ae1d5333 (diff)
parentf567377e406c032fff0799bde4fdf4a977529b84 (diff)
downloadtip-7a18c0fff41ee60438ab2a1837d5b1a73ca2e2dd.tar.gz
Merge tag 'ovl-vfs-6.8' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs
Pull backing file updates from Amir Goldstein: These patches essentially just lift some overlayfs code to common code. The motivation is to reuse common stacking code for the FUSE passthrough patches that I am shaping up for upstream. The FUSE passthrough work will be coming in over the next cycles. I have been testing those patches with my fuse-backing-fd development branch for quite some time and I think both you and Miklos gave a conceptual ACK to some version of this work. * tag 'ovl-vfs-6.8' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs: fs: factor out backing_file_mmap() helper fs: factor out backing_file_splice_{read,write}() helpers fs: factor out backing_file_{read,write}_iter() helpers fs: prepare for stackable filesystems backing file helpers Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/fs/open.c b/fs/open.c
index d877228d5939cc..a7505423743797 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1184,44 +1184,6 @@ struct file *kernel_file_open(const struct path *path, int flags,
}
EXPORT_SYMBOL_GPL(kernel_file_open);
-/**
- * backing_file_open - open a backing file for kernel internal use
- * @user_path: path that the user reuqested to open
- * @flags: open flags
- * @real_path: path of the backing file
- * @cred: credentials for open
- *
- * Open a backing file for a stackable filesystem (e.g., overlayfs).
- * @user_path may be on the stackable filesystem and @real_path on the
- * underlying filesystem. In this case, we want to be able to return the
- * @user_path of the stackable filesystem. This is done by embedding the
- * returned file into a container structure that also stores the stacked
- * file's path, which can be retrieved using backing_file_user_path().
- */
-struct file *backing_file_open(const struct path *user_path, int flags,
- const struct path *real_path,
- const struct cred *cred)
-{
- struct file *f;
- int error;
-
- f = alloc_empty_backing_file(flags, cred);
- if (IS_ERR(f))
- return f;
-
- path_get(user_path);
- *backing_file_user_path(f) = *user_path;
- f->f_path = *real_path;
- error = do_dentry_open(f, d_inode(real_path->dentry), NULL);
- if (error) {
- fput(f);
- f = ERR_PTR(error);
- }
-
- return f;
-}
-EXPORT_SYMBOL_GPL(backing_file_open);
-
#define WILL_CREATE(flags) (flags & (O_CREAT | __O_TMPFILE))
#define O_PATH_FLAGS (O_DIRECTORY | O_NOFOLLOW | O_PATH | O_CLOEXEC)