summaryrefslogtreecommitdiff
path: root/include/linux/backing-file.h
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2023-10-02 17:19:46 +0300
committerAmir Goldstein <amir73il@gmail.com>2023-12-23 16:35:08 +0200
commitf91a704f7161c2cf0fcd41fa9fbec4355b813fff (patch)
treec1af6faa09cad5d82be32ae5d76381cb79c4de19 /include/linux/backing-file.h
parentd9e5d31084b024734e64307521414ef0ae1d5333 (diff)
fs: prepare for stackable filesystems backing file helpers
In preparation for factoring out some backing file io helpers from overlayfs, move backing_file_open() into a new file fs/backing-file.c and header. Add a MAINTAINERS entry for stackable filesystems and add a Kconfig FS_STACK which stackable filesystems need to select. For now, the backing_file struct, the backing_file alloc/free functions and the backing_file_real_path() accessor remain internal to file_table.c. We may change that in the future. Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'include/linux/backing-file.h')
-rw-r--r--include/linux/backing-file.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/backing-file.h b/include/linux/backing-file.h
new file mode 100644
index 000000000000..55c9e804f780
--- /dev/null
+++ b/include/linux/backing-file.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Common helpers for stackable filesystems and backing files.
+ *
+ * Copyright (C) 2023 CTERA Networks.
+ */
+
+#ifndef _LINUX_BACKING_FILE_H
+#define _LINUX_BACKING_FILE_H
+
+#include <linux/file.h>
+
+struct file *backing_file_open(const struct path *user_path, int flags,
+ const struct path *real_path,
+ const struct cred *cred);
+
+#endif /* _LINUX_BACKING_FILE_H */