From 685dd2d5bea3e6368cea8002caf404d1b0b5c9f1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 26 Jul 2011 04:34:13 -0400 Subject: init/initramfs.c: should use umode_t Signed-off-by: Al Viro --- init/initramfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'init') 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) static __initdata struct hash { int ino, minor, major; - mode_t mode; + umode_t mode; struct hash *next; char name[N_ALIGN(PATH_MAX)]; } *head[32]; @@ -35,7 +35,7 @@ static inline int hash(int major, int minor, int ino) } static char __init *find_link(int major, int minor, int ino, - mode_t mode, char *name) + umode_t mode, char *name) { struct hash **p, *q; for (p = head + hash(major, minor, ino); *p; p = &(*p)->next) { @@ -120,7 +120,7 @@ static __initdata time_t mtime; /* cpio header parsing */ static __initdata unsigned long ino, major, minor, nlink; -static __initdata mode_t mode; +static __initdata umode_t mode; static __initdata unsigned long body_len, name_len; static __initdata uid_t uid; static __initdata gid_t gid; @@ -276,7 +276,7 @@ static int __init maybe_link(void) return 0; } -static void __init clean_path(char *path, mode_t mode) +static void __init clean_path(char *path, umode_t mode) { struct stat st; -- cgit v1.2.3 From d8c9584ea2a92879f471fd3a2be3af6c534fb035 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 7 Dec 2011 18:16:57 -0500 Subject: vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb Signed-off-by: Al Viro --- init/do_mounts.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'init') 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; } -- cgit v1.2.3