aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-12-07 18:16:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-06 23:16:53 -0500
commitd8c9584ea2a92879f471fd3a2be3af6c534fb035 (patch)
tree3541b9c6228f820bdc65e4875156eb27b1c91cb1 /init
parentece2ccb668046610189d88d6aaf05aeb09c988a1 (diff)
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.c10
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)
325 325
326static int __init do_mount_root(char *name, char *fs, int flags, void *data) 326static int __init do_mount_root(char *name, char *fs, int flags, void *data)
327{ 327{
328 struct super_block *s;
328 int err = sys_mount(name, "/root", fs, flags, data); 329 int err = sys_mount(name, "/root", fs, flags, data);
329 if (err) 330 if (err)
330 return err; 331 return err;
331 332
332 sys_chdir((const char __user __force *)"/root"); 333 sys_chdir((const char __user __force *)"/root");
333 ROOT_DEV = current->fs->pwd.mnt->mnt_sb->s_dev; 334 s = current->fs->pwd.dentry->d_sb;
335 ROOT_DEV = s->s_dev;
334 printk(KERN_INFO 336 printk(KERN_INFO
335 "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n", 337 "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
336 current->fs->pwd.mnt->mnt_sb->s_type->name, 338 s->s_type->name,
337 current->fs->pwd.mnt->mnt_sb->s_flags & MS_RDONLY ? 339 s->s_flags & MS_RDONLY ? " readonly" : "",
338 " readonly" : "", MAJOR(ROOT_DEV), MINOR(ROOT_DEV)); 340 MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
339 return 0; 341 return 0;
340} 342}
341 343