summaryrefslogtreecommitdiffstats
path: root/init/do_mounts.c
diff options
context:
space:
mode:
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r--init/do_mounts.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 0f6e1d985a3..b2eee02e0f8 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;
}