aboutsummaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-08 15:19:57 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-08 15:19:57 -0500
commit972b2c719990f91eb3b2310d44ef8a2d38955a14 (patch)
treeb25a250ec5bec4b7b6355d214642d8b57c5cab32 /init
parent02550d61f49266930e674286379d3601006b2893 (diff)
parentc3aa077648e147783a7a53b409578234647db853 (diff)
Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits) reiserfs: Properly display mount options in /proc/mounts vfs: prevent remount read-only if pending removes vfs: count unlinked inodes vfs: protect remounting superblock read-only vfs: keep list of mounts for each superblock vfs: switch ->show_options() to struct dentry * vfs: switch ->show_path() to struct dentry * vfs: switch ->show_devname() to struct dentry * vfs: switch ->show_stats to struct dentry * switch security_path_chmod() to struct path * vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb vfs: trim includes a bit switch mnt_namespace ->root to struct mount vfs: take /proc/*/mounts and friends to fs/proc_namespace.c vfs: opencode mntget() mnt_set_mountpoint() vfs: spread struct mount - remaining argument of next_mnt() vfs: move fsnotify junk to struct mount vfs: move mnt_devname vfs: move mnt_list to struct mount vfs: switch pnode.h macros to struct mount * ...
Diffstat (limited to 'init')
-rw-r--r--init/do_mounts.c10
-rw-r--r--init/initramfs.c8
2 files changed, 10 insertions, 8 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
diff --git a/init/initramfs.c b/init/initramfs.c
index 2531811d42cb..8216c303b082 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -22,7 +22,7 @@ static void __init error(char *x)
22 22
23static __initdata struct hash { 23static __initdata struct hash {
24 int ino, minor, major; 24 int ino, minor, major;
25 mode_t mode; 25 umode_t mode;
26 struct hash *next; 26 struct hash *next;
27 char name[N_ALIGN(PATH_MAX)]; 27 char name[N_ALIGN(PATH_MAX)];
28} *head[32]; 28} *head[32];
@@ -35,7 +35,7 @@ static inline int hash(int major, int minor, int ino)
35} 35}
36 36
37static char __init *find_link(int major, int minor, int ino, 37static char __init *find_link(int major, int minor, int ino,
38 mode_t mode, char *name) 38 umode_t mode, char *name)
39{ 39{
40 struct hash **p, *q; 40 struct hash **p, *q;
41 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) { 41 for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) {
@@ -120,7 +120,7 @@ static __initdata time_t mtime;
120/* cpio header parsing */ 120/* cpio header parsing */
121 121
122static __initdata unsigned long ino, major, minor, nlink; 122static __initdata unsigned long ino, major, minor, nlink;
123static __initdata mode_t mode; 123static __initdata umode_t mode;
124static __initdata unsigned long body_len, name_len; 124static __initdata unsigned long body_len, name_len;
125static __initdata uid_t uid; 125static __initdata uid_t uid;
126static __initdata gid_t gid; 126static __initdata gid_t gid;
@@ -276,7 +276,7 @@ static int __init maybe_link(void)
276 return 0; 276 return 0;
277} 277}
278 278
279static void __init clean_path(char *path, mode_t mode) 279static void __init clean_path(char *path, umode_t mode)
280{ 280{
281 struct stat st; 281 struct stat st;
282 282