aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/fs_context.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-03-27 14:15:16 +0000
committerAl Viro <viro@zeniv.linux.org.uk>2019-09-05 14:34:22 -0400
commitfe62c3a4e17ddfe672710425ab6eba2ba7203526 (patch)
tree4b8bfb4bbfbeb53c75b14f4522233ed3216749aa /include/linux/fs_context.h
parentnew helper: get_tree_keyed() (diff)
downloadwireguard-linux-fe62c3a4e17ddfe672710425ab6eba2ba7203526.tar.xz
wireguard-linux-fe62c3a4e17ddfe672710425ab6eba2ba7203526.zip
vfs: Create fs_context-aware mount_bdev() replacement
Create a function, get_tree_bdev(), that is fs_context-aware and a ->get_tree() counterpart of mount_bdev(). It caches the block device pointer in the fs_context struct so that this information can be passed into sget_fc()'s test and set functions. Signed-off-by: David Howells <dhowells@redhat.com> cc: Jens Axboe <axboe@kernel.dk> cc: linux-block@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs_context.h')
-rw-r--r--include/linux/fs_context.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fs_context.h b/include/linux/fs_context.h
index aad5e68d58e2..84a5eaa09f19 100644
--- a/include/linux/fs_context.h
+++ b/include/linux/fs_context.h
@@ -88,6 +88,7 @@ struct fs_context {
struct mutex uapi_mutex; /* Userspace access mutex */
struct file_system_type *fs_type;
void *fs_private; /* The filesystem's context */
+ void *sget_key;
struct dentry *root; /* The root and superblock */
struct user_namespace *user_ns; /* The user namespace for this mount */
struct net *net_ns; /* The network namespace for this mount */
@@ -159,6 +160,10 @@ extern int get_tree_keyed(struct fs_context *fc,
struct fs_context *fc),
void *key);
+extern int get_tree_bdev(struct fs_context *fc,
+ int (*fill_super)(struct super_block *sb,
+ struct fs_context *fc));
+
extern const struct file_operations fscontext_fops;
/*