summaryrefslogtreecommitdiffstats
path: root/fs/super.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-11-04 07:18:51 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2019-01-30 17:44:25 -0500
commita0c9a8b8fd9fd572b0d60276beb2142c8f59f9b8 (patch)
tree240a81dae063cbcabc8c8b0d28af7e343dbf20b2 /fs/super.c
parent8f2918898eb5fe25845dde7f4a77bda0e2966e05 (diff)
teach vfs_get_tree() to handle subtype, switch do_new_mount() to it
Roll the handling of subtypes into do_new_mount() and vfs_get_tree(). The former determines any subtype string and hangs it off the fs_context; the latter applies it. Make do_new_mount() create, parameterise and commit an fs_context and create a mount for itself rather than calling vfs_kern_mount(). [AV -- missing kstrdup()] [AV -- ... and no kstrdup() if we get to setting ->s_submount - we simply transfer it from fc, leaving NULL behind] [AV -- constify ->s_submount, while we are at it] Reviewed-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/super.c')
-rw-r--r--fs/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c
index fc3887277ad1..b91b6df05b67 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -1262,6 +1262,11 @@ int vfs_get_tree(struct fs_context *fc)
1262 sb = fc->root->d_sb; 1262 sb = fc->root->d_sb;
1263 WARN_ON(!sb->s_bdi); 1263 WARN_ON(!sb->s_bdi);
1264 1264
1265 if (fc->subtype && !sb->s_subtype) {
1266 sb->s_subtype = fc->subtype;
1267 fc->subtype = NULL;
1268 }
1269
1265 /* 1270 /*
1266 * Write barrier is for super_cache_count(). We place it before setting 1271 * Write barrier is for super_cache_count(). We place it before setting
1267 * SB_BORN as the data dependency between the two functions is the 1272 * SB_BORN as the data dependency between the two functions is the