aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-12-23 18:55:56 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2019-01-30 17:44:27 -0500
commitf3a09c92018a91ad0981146a4ac59414f814d801 (patch)
treec500afabc514faf977ceacfbe57ce04910bcc3e0 /include
parentfs_context flavour for submounts (diff)
downloadlinux-dev-f3a09c92018a91ad0981146a4ac59414f814d801.tar.xz
linux-dev-f3a09c92018a91ad0981146a4ac59414f814d801.zip
introduce fs_context methods
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/fs_context.h13
2 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index c65d02c5c512..8d578a9e1e8c 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -61,6 +61,7 @@ struct workqueue_struct;
struct iov_iter;
struct fscrypt_info;
struct fscrypt_operations;
+struct fs_context;
extern void __init inode_init(void);
extern void __init inode_init_early(void);
@@ -2173,6 +2174,7 @@ struct file_system_type {
#define FS_HAS_SUBTYPE 4
#define FS_USERNS_MOUNT 8 /* Can be mounted by userns root */
#define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */
+ int (*init_fs_context)(struct fs_context *);
struct dentry *(*mount) (struct file_system_type *, int,
const char *, void *);
void (*kill_sb) (struct super_block *);
diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h
index 7feb018c7a9e..087c12954360 100644
--- a/include/linux/fs_context.h
+++ b/include/linux/fs_context.h
@@ -20,8 +20,13 @@ struct cred;
struct dentry;
struct file_operations;
struct file_system_type;
+struct mnt_namespace;
struct net;
+struct pid_namespace;
+struct super_block;
struct user_namespace;
+struct vfsmount;
+struct path;
enum fs_context_purpose {
FS_CONTEXT_FOR_MOUNT, /* New superblock for explicit mount */
@@ -39,6 +44,7 @@ enum fs_context_purpose {
* See Documentation/filesystems/mounting.txt
*/
struct fs_context {
+ const struct fs_context_operations *ops;
struct file_system_type *fs_type;
void *fs_private; /* The filesystem's context */
struct dentry *root; /* The root and superblock */
@@ -54,6 +60,13 @@ struct fs_context {
bool need_free:1; /* Need to call ops->free() */
};
+struct fs_context_operations {
+ void (*free)(struct fs_context *fc);
+ int (*parse_monolithic)(struct fs_context *fc, void *data);
+ int (*get_tree)(struct fs_context *fc);
+ int (*reconfigure)(struct fs_context *fc);
+};
+
/*
* fs_context manipulation functions.
*/