diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-12-07 18:16:57 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-06 23:16:53 -0500 |
commit | d8c9584ea2a92879f471fd3a2be3af6c534fb035 (patch) | |
tree | 3541b9c6228f820bdc65e4875156eb27b1c91cb1 /init | |
parent | ece2ccb668046610189d88d6aaf05aeb09c988a1 (diff) | |
download | linux-stable-d8c9584ea2a92879f471fd3a2be3af6c534fb035.tar.gz linux-stable-d8c9584ea2a92879f471fd3a2be3af6c534fb035.tar.bz2 linux-stable-d8c9584ea2a92879f471fd3a2be3af6c534fb035.zip |
vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'init')
-rw-r--r-- | init/do_mounts.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index 0f6e1d985a3b..b2eee02e0f83 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -325,17 +325,19 @@ static void __init get_fs_names(char *page) static int __init do_mount_root(char *name, char *fs, int flags, void *data) { + struct super_block *s; int err = sys_mount(name, "/root", fs, flags, data); if (err) return err; sys_chdir((const char __user __force *)"/root"); - ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev; + s = current->fs->pwd.dentry->d_sb; + ROOT_DEV = s->s_dev; printk(KERN_INFO "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n", - current->fs->pwd.mnt->mnt_sb->s_type->name, - current->fs->pwd.mnt->mnt_sb->s_flags & MS_RDONLY ? - " readonly" : "", MAJOR(ROOT_DEV), MINOR(ROOT_DEV)); + s->s_type->name, + s->s_flags & MS_RDONLY ? " readonly" : "", + MAJOR(ROOT_DEV), MINOR(ROOT_DEV)); return 0; } |