Line 514... |
Line 514... |
void *data, int silent)
|
void *data, int silent)
|
{
|
{
|
struct super_block * s;
|
struct super_block * s;
|
struct file_system_type *type;
|
struct file_system_type *type;
|
|
|
printk("%s - %s:%d\n",__FILE__,__FUNCTION__,__LINE__);
|
|
if (!dev)
|
if (!dev)
|
return NULL;
|
return NULL;
|
printk("%s - %s:%d\n",__FILE__,__FUNCTION__,__LINE__);
|
|
check_disk_change(dev);
|
check_disk_change(dev);
|
s = get_super(dev);
|
s = get_super(dev);
|
printk("%s - %s:%d\n",__FILE__,__FUNCTION__,__LINE__);
|
|
if (s)
|
if (s)
|
return s;
|
return s;
|
printk("%s - %s:%d\n",__FILE__,__FUNCTION__,__LINE__);
|
|
if (!(type = get_fs_type(name))) {
|
if (!(type = get_fs_type(name))) {
|
printk("VFS: on device %s: get_fs_type(%s) failed\n",
|
printk("VFS: on device %s: get_fs_type(%s) failed\n",
|
kdevname(dev), name);
|
kdevname(dev), name);
|
return NULL;
|
return NULL;
|
}
|
}
|
printk("%s - %s:%d\n",__FILE__,__FUNCTION__,__LINE__);
|
|
for (s = 0+super_blocks ;; s++) {
|
for (s = 0+super_blocks ;; s++) {
|
if (s >= NR_SUPER+super_blocks)
|
if (s >= NR_SUPER+super_blocks)
|
return NULL;
|
return NULL;
|
if (!(s->s_dev))
|
if (!(s->s_dev))
|
break;
|
break;
|
}
|
}
|
printk("%s - %s:%d\n",__FILE__,__FUNCTION__,__LINE__);
|
|
s->s_dev = dev;
|
s->s_dev = dev;
|
s->s_flags = flags;
|
s->s_flags = flags;
|
if (!type->read_super(s,data, silent)) {
|
if (!type->read_super(s,data, silent)) {
|
s->s_dev = 0;
|
s->s_dev = 0;
|
return NULL;
|
return NULL;
|
}
|
}
|
printk("%s - %s:%d\n",__FILE__,__FUNCTION__,__LINE__);
|
|
s->s_dev = dev;
|
s->s_dev = dev;
|
s->s_covered = NULL;
|
s->s_covered = NULL;
|
s->s_rd_only = 0;
|
s->s_rd_only = 0;
|
s->s_dirt = 0;
|
s->s_dirt = 0;
|
s->s_type = type;
|
s->s_type = type;
|
Line 946... |
Line 939... |
struct super_block * sb;
|
struct super_block * sb;
|
struct vfsmount *vfsmnt;
|
struct vfsmount *vfsmnt;
|
struct inode * inode, d_inode;
|
struct inode * inode, d_inode;
|
struct file filp;
|
struct file filp;
|
int retval;
|
int retval;
|
printk("do_mount_root1\n");
|
|
#ifdef CONFIG_ROOT_NFS
|
#ifdef CONFIG_ROOT_NFS
|
if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR)
|
if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR)
|
if (nfs_root_init(nfs_root_name, nfs_root_addrs) < 0) {
|
if (nfs_root_init(nfs_root_name, nfs_root_addrs) < 0) {
|
printk(KERN_ERR "Root-NFS: Unable to contact NFS "
|
printk(KERN_ERR "Root-NFS: Unable to contact NFS "
|
"server for root fs, using /dev/fd0 instead\n");
|
"server for root fs, using /dev/fd0 instead\n");
|
Line 1018... |
Line 1011... |
filp.f_inode = &d_inode;
|
filp.f_inode = &d_inode;
|
if ( root_mountflags & MS_RDONLY)
|
if ( root_mountflags & MS_RDONLY)
|
filp.f_mode = 1; /* read only */
|
filp.f_mode = 1; /* read only */
|
else
|
else
|
filp.f_mode = 3; /* read write */
|
filp.f_mode = 3; /* read write */
|
printk("do_mount_root2\n");
|
|
retval = blkdev_open(&d_inode, &filp);
|
retval = blkdev_open(&d_inode, &filp);
|
if (retval == -EROFS) {
|
if (retval == -EROFS) {
|
root_mountflags |= MS_RDONLY;
|
root_mountflags |= MS_RDONLY;
|
filp.f_mode = 1;
|
filp.f_mode = 1;
|
retval = blkdev_open(&d_inode, &filp);
|
retval = blkdev_open(&d_inode, &filp);
|
}
|
}
|
printk("do_mount_root3\n");
|
|
if (retval)
|
if (retval)
|
/*
|
/*
|
* Allow the user to distinguish between failed open
|
* Allow the user to distinguish between failed open
|
* and bad superblock on root device.
|
* and bad superblock on root device.
|
*/
|
*/
|
printk("VFS: Cannot open root device %s\n",
|
printk("VFS: Cannot open root device %s\n",
|
kdevname(ROOT_DEV));
|
kdevname(ROOT_DEV));
|
else for (fs_type = file_systems ; fs_type ; fs_type = fs_type->next) {
|
else for (fs_type = file_systems ; fs_type ; fs_type = fs_type->next) {
|
printk("do_mount_root4\n");
|
|
if (!fs_type->requires_dev)
|
if (!fs_type->requires_dev)
|
continue;
|
continue;
|
printk("do_mount_root5\n");
|
|
sb = read_super(ROOT_DEV,fs_type->name,root_mountflags,NULL,0);
|
sb = read_super(ROOT_DEV,fs_type->name,root_mountflags,NULL,0);
|
if (sb) {
|
if (sb) {
|
printk("do_mount_root6\n");
|
|
inode = sb->s_mounted;
|
inode = sb->s_mounted;
|
inode->i_count += 3 ; /* NOTE! it is logically used 4 times, not 1 */
|
inode->i_count += 3 ; /* NOTE! it is logically used 4 times, not 1 */
|
sb->s_covered = inode;
|
sb->s_covered = inode;
|
sb->s_flags = root_mountflags;
|
sb->s_flags = root_mountflags;
|
current->fs->pwd = inode;
|
current->fs->pwd = inode;
|