mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
8f2918898e
commit
a0c9a8b8fd
3 changed files with 52 additions and 32 deletions
|
|
@ -1262,6 +1262,11 @@ int vfs_get_tree(struct fs_context *fc)
|
|||
sb = fc->root->d_sb;
|
||||
WARN_ON(!sb->s_bdi);
|
||||
|
||||
if (fc->subtype && !sb->s_subtype) {
|
||||
sb->s_subtype = fc->subtype;
|
||||
fc->subtype = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Write barrier is for super_cache_count(). We place it before setting
|
||||
* SB_BORN as the data dependency between the two functions is the
|
||||
|
|
|
|||
Loading…
Reference in a new issue