Commit 5d53b9bf authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/davem/sparc-2.6

into ppc970.osdl.org:/home/torvalds/v2.5/linux
parents d77461da 837fd582
...@@ -23,6 +23,11 @@ CFLAGS += -mbig-endian ...@@ -23,6 +23,11 @@ CFLAGS += -mbig-endian
AS += -EB AS += -EB
LD += -EB LD += -EB
AFLAGS += -mbig-endian AFLAGS += -mbig-endian
else
CFLAGS += -mlittle-endian
AS += -EL
LD += -EL
AFLAGS += -mlittle-endian
endif endif
comma = , comma = ,
......
...@@ -187,6 +187,7 @@ EXPORT_SYMBOL(__arch_copy_from_user); ...@@ -187,6 +187,7 @@ EXPORT_SYMBOL(__arch_copy_from_user);
EXPORT_SYMBOL(__arch_copy_to_user); EXPORT_SYMBOL(__arch_copy_to_user);
EXPORT_SYMBOL(__arch_clear_user); EXPORT_SYMBOL(__arch_clear_user);
EXPORT_SYMBOL(__arch_strnlen_user); EXPORT_SYMBOL(__arch_strnlen_user);
EXPORT_SYMBOL(__arch_strncpy_from_user);
/* consistent area handling */ /* consistent area handling */
EXPORT_SYMBOL(consistent_alloc); EXPORT_SYMBOL(consistent_alloc);
......
...@@ -347,7 +347,7 @@ config CPU_BIG_ENDIAN ...@@ -347,7 +347,7 @@ config CPU_BIG_ENDIAN
help help
Say Y if you plan on running a kernel in big-endian mode. Say Y if you plan on running a kernel in big-endian mode.
Note that your board must be properly built and your board Note that your board must be properly built and your board
port must properly enable and big-endian related features port must properly enable any big-endian related features
of your chipset/board/processor. of your chipset/board/processor.
config CPU_ICACHE_DISABLE config CPU_ICACHE_DISABLE
......
...@@ -1812,7 +1812,6 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) ...@@ -1812,7 +1812,6 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
return -ENOMEM; return -ENOMEM;
inode->i_op = &simple_dir_inode_operations; inode->i_op = &simple_dir_inode_operations;
if (!(d = d_alloc_root (inode))) { if (!(d = d_alloc_root (inode))) {
enomem:
iput (inode); iput (inode);
return -ENOMEM; return -ENOMEM;
} }
...@@ -1823,12 +1822,15 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent) ...@@ -1823,12 +1822,15 @@ gadgetfs_fill_super (struct super_block *sb, void *opts, int silent)
*/ */
dev = dev_new (); dev = dev_new ();
if (!dev) if (!dev)
goto enomem; return -ENOMEM;
dev->sb = sb; dev->sb = sb;
if (!(inode = gadgetfs_create_file (sb, CHIP, if (!(inode = gadgetfs_create_file (sb, CHIP,
dev, &dev_init_operations, dev, &dev_init_operations,
&dev->dentry))) &dev->dentry))) {
goto enomem; put_dev(dev);
return -ENOMEM;
}
/* other endpoint files are available after hardware setup, /* other endpoint files are available after hardware setup,
* from binding to a controller. * from binding to a controller.
...@@ -1849,8 +1851,10 @@ static void ...@@ -1849,8 +1851,10 @@ static void
gadgetfs_kill_sb (struct super_block *sb) gadgetfs_kill_sb (struct super_block *sb)
{ {
kill_litter_super (sb); kill_litter_super (sb);
put_dev (the_device); if (the_device) {
the_device = 0; put_dev (the_device);
the_device = 0;
}
} }
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
......
...@@ -135,7 +135,7 @@ static struct pci_device_id radeonfb_pci_table[] = { ...@@ -135,7 +135,7 @@ static struct pci_device_id radeonfb_pci_table[] = {
CHIP_DEF(PCI_CHIP_R200_QM, R200, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_R200_QM, R200, CHIP_HAS_CRTC2),
/* Mobility M7 */ /* Mobility M7 */
CHIP_DEF(PCI_CHIP_RADEON_LW, RV200, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), CHIP_DEF(PCI_CHIP_RADEON_LW, RV200, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
CHIP_DEF(PCI_CHIP_RADEON_LW, RV200, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), CHIP_DEF(PCI_CHIP_RADEON_LX, RV200, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY),
/* 7500 */ /* 7500 */
CHIP_DEF(PCI_CHIP_RV200_QW, RV200, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_RV200_QW, RV200, CHIP_HAS_CRTC2),
CHIP_DEF(PCI_CHIP_RV200_QX, RV200, CHIP_HAS_CRTC2), CHIP_DEF(PCI_CHIP_RV200_QX, RV200, CHIP_HAS_CRTC2),
......
...@@ -333,6 +333,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -333,6 +333,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
struct object_info root_obj; struct object_info root_obj;
unsigned char *b_data; unsigned char *b_data;
struct adfs_sb_info *asb; struct adfs_sb_info *asb;
struct inode *root;
asb = kmalloc(sizeof(*asb), GFP_KERNEL); asb = kmalloc(sizeof(*asb), GFP_KERNEL);
if (!asb) if (!asb)
...@@ -443,10 +444,11 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -443,10 +444,11 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
asb->s_namelen = ADFS_F_NAME_LEN; asb->s_namelen = ADFS_F_NAME_LEN;
} }
sb->s_root = d_alloc_root(adfs_iget(sb, &root_obj)); root = adfs_iget(sb, &root_obj);
sb->s_root = d_alloc_root(root);
if (!sb->s_root) { if (!sb->s_root) {
int i; int i;
iput(root);
for (i = 0; i < asb->s_map_size; i++) for (i = 0; i < asb->s_map_size; i++)
brelse(asb->s_map[i].dm_bh); brelse(asb->s_map[i].dm_bh);
kfree(asb->s_map); kfree(asb->s_map);
......
...@@ -280,7 +280,6 @@ static int afs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -280,7 +280,6 @@ static int afs_fill_super(struct super_block *sb, void *data, int silent)
return 0; return 0;
error: error:
dput(root);
iput(inode); iput(inode);
afs_put_volume(as->volume); afs_put_volume(as->volume);
kfree(as); kfree(as);
......
...@@ -213,6 +213,9 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) ...@@ -213,6 +213,9 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
* Get the root inode and dentry, but defer checking for errors. * Get the root inode and dentry, but defer checking for errors.
*/ */
root_inode = autofs4_get_inode(s, autofs4_mkroot(sbi)); root_inode = autofs4_get_inode(s, autofs4_mkroot(sbi));
if (!root_inode)
goto fail_free;
root_inode->i_op = &autofs4_root_inode_operations; root_inode->i_op = &autofs4_root_inode_operations;
root_inode->i_fop = &autofs4_root_operations; root_inode->i_fop = &autofs4_root_operations;
root = d_alloc_root(root_inode); root = d_alloc_root(root_inode);
...@@ -264,22 +267,13 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) ...@@ -264,22 +267,13 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
*/ */
fail_fput: fail_fput:
printk("autofs: pipe file descriptor does not contain proper ops\n"); printk("autofs: pipe file descriptor does not contain proper ops\n");
/*
* fput() can block, so we clear the super block first.
*/
fput(pipe); fput(pipe);
/* fall through */ /* fall through */
fail_dput: fail_dput:
/*
* dput() can block, so we clear the super block first.
*/
dput(root); dput(root);
goto fail_free; goto fail_free;
fail_iput: fail_iput:
printk("autofs: get root dentry failed\n"); printk("autofs: get root dentry failed\n");
/*
* iput() can block, so we clear the super block first.
*/
iput(root_inode); iput(root_inode);
fail_free: fail_free:
kfree(sbi); kfree(sbi);
......
...@@ -789,6 +789,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -789,6 +789,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
struct buffer_head *bh; struct buffer_head *bh;
befs_sb_info *befs_sb; befs_sb_info *befs_sb;
befs_super_block *disk_sb; befs_super_block *disk_sb;
struct inode *root;
const unsigned long sb_block = 0; const unsigned long sb_block = 0;
const off_t x86_sb_off = 512; const off_t x86_sb_off = 512;
...@@ -863,9 +864,10 @@ befs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -863,9 +864,10 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
/* Set real blocksize of fs */ /* Set real blocksize of fs */
sb_set_blocksize(sb, (ulong) befs_sb->block_size); sb_set_blocksize(sb, (ulong) befs_sb->block_size);
sb->s_op = (struct super_operations *) &befs_sops; sb->s_op = (struct super_operations *) &befs_sops;
sb->s_root = root = iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir)));
d_alloc_root(iget(sb, iaddr2blockno(sb, &(befs_sb->root_dir)))); sb->s_root = d_alloc_root(root);
if (!sb->s_root) { if (!sb->s_root) {
iput(root);
befs_error(sb, "get root inode failed"); befs_error(sb, "get root inode failed");
goto unaquire_priv_sbp; goto unaquire_priv_sbp;
} }
......
...@@ -195,6 +195,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent) ...@@ -195,6 +195,8 @@ static int coda_fill_super(struct super_block *sb, void *data, int silent)
printk("coda_read_super: rootinode is %ld dev %s\n", printk("coda_read_super: rootinode is %ld dev %s\n",
root->i_ino, root->i_sb->s_id); root->i_ino, root->i_sb->s_id);
sb->s_root = d_alloc_root(root); sb->s_root = d_alloc_root(root);
if (!sb->s_root)
goto error;
return 0; return 0;
error: error:
......
...@@ -199,6 +199,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -199,6 +199,7 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
struct cramfs_super super; struct cramfs_super super;
unsigned long root_offset; unsigned long root_offset;
struct cramfs_sb_info *sbi; struct cramfs_sb_info *sbi;
struct inode *root;
sbi = kmalloc(sizeof(struct cramfs_sb_info), GFP_KERNEL); sbi = kmalloc(sizeof(struct cramfs_sb_info), GFP_KERNEL);
if (!sbi) if (!sbi)
...@@ -263,7 +264,14 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -263,7 +264,14 @@ static int cramfs_fill_super(struct super_block *sb, void *data, int silent)
/* Set it all up.. */ /* Set it all up.. */
sb->s_op = &cramfs_ops; sb->s_op = &cramfs_ops;
sb->s_root = d_alloc_root(get_cramfs_inode(sb, &super.root)); root = get_cramfs_inode(sb, &super.root);
if (!root)
goto out;
sb->s_root = d_alloc_root(root);
if (!sb->s_root) {
iput(root);
goto out;
}
return 0; return 0;
out: out:
kfree(sbi); kfree(sbi);
......
...@@ -210,6 +210,7 @@ int efs_fill_super(struct super_block *s, void *d, int silent) ...@@ -210,6 +210,7 @@ int efs_fill_super(struct super_block *s, void *d, int silent)
{ {
struct efs_sb_info *sb; struct efs_sb_info *sb;
struct buffer_head *bh; struct buffer_head *bh;
struct inode *root;
sb = kmalloc(sizeof(struct efs_sb_info), GFP_KERNEL); sb = kmalloc(sizeof(struct efs_sb_info), GFP_KERNEL);
if (!sb) if (!sb)
...@@ -266,10 +267,12 @@ int efs_fill_super(struct super_block *s, void *d, int silent) ...@@ -266,10 +267,12 @@ int efs_fill_super(struct super_block *s, void *d, int silent)
s->s_flags |= MS_RDONLY; s->s_flags |= MS_RDONLY;
} }
s->s_op = &efs_superblock_operations; s->s_op = &efs_superblock_operations;
s->s_root = d_alloc_root(iget(s, EFS_ROOTINODE)); root = iget(s, EFS_ROOTINODE);
s->s_root = d_alloc_root(root);
if (!(s->s_root)) { if (!(s->s_root)) {
printk(KERN_ERR "EFS: get root inode failed\n"); printk(KERN_ERR "EFS: get root inode failed\n");
iput(root);
goto out_no_fs; goto out_no_fs;
} }
......
...@@ -563,6 +563,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -563,6 +563,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
struct buffer_head * bh; struct buffer_head * bh;
struct ext2_sb_info * sbi; struct ext2_sb_info * sbi;
struct ext2_super_block * es; struct ext2_super_block * es;
struct inode *root;
unsigned long block, sb_block = 1; unsigned long block, sb_block = 1;
unsigned long logic_sb_block = get_sb_block(&data); unsigned long logic_sb_block = get_sb_block(&data);
unsigned long offset = 0; unsigned long offset = 0;
...@@ -815,15 +816,17 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -815,15 +816,17 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
*/ */
sb->s_op = &ext2_sops; sb->s_op = &ext2_sops;
sb->s_export_op = &ext2_export_ops; sb->s_export_op = &ext2_export_ops;
sb->s_root = d_alloc_root(iget(sb, EXT2_ROOT_INO)); root = iget(sb, EXT2_ROOT_INO);
if (!sb->s_root || !S_ISDIR(sb->s_root->d_inode->i_mode) || sb->s_root = d_alloc_root(root);
!sb->s_root->d_inode->i_blocks || !sb->s_root->d_inode->i_size) { if (!sb->s_root) {
if (sb->s_root) { iput(root);
dput(sb->s_root); printk(KERN_ERR "EXT2-fs: get root inode failed\n");
sb->s_root = NULL; goto failed_mount2;
printk(KERN_ERR "EXT2-fs: corrupt root inode, run e2fsck\n"); }
} else if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
printk(KERN_ERR "EXT2-fs: get root inode failed\n"); dput(sb->s_root);
sb->s_root = NULL;
printk(KERN_ERR "EXT2-fs: corrupt root inode, run e2fsck\n");
goto failed_mount2; goto failed_mount2;
} }
if (EXT2_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) if (EXT2_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL))
......
...@@ -1040,6 +1040,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1040,6 +1040,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
unsigned long offset = 0; unsigned long offset = 0;
unsigned long journal_inum = 0; unsigned long journal_inum = 0;
unsigned long def_mount_opts; unsigned long def_mount_opts;
struct inode *root;
int blocksize; int blocksize;
int hblock; int hblock;
int db_count; int db_count;
...@@ -1354,16 +1355,17 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1354,16 +1355,17 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
* so we can safely mount the rest of the filesystem now. * so we can safely mount the rest of the filesystem now.
*/ */
sb->s_root = d_alloc_root(iget(sb, EXT3_ROOT_INO)); root = iget(sb, EXT3_ROOT_INO);
if (!sb->s_root || !S_ISDIR(sb->s_root->d_inode->i_mode) || sb->s_root = d_alloc_root(root);
!sb->s_root->d_inode->i_blocks || !sb->s_root->d_inode->i_size) { if (!sb->s_root) {
if (sb->s_root) { printk(KERN_ERR "EXT3-fs: get root inode failed\n");
dput(sb->s_root); iput(root);
sb->s_root = NULL; goto failed_mount3;
printk(KERN_ERR }
"EXT3-fs: corrupt root inode, run e2fsck\n"); if (!S_ISDIR(root->i_mode) || !root->i_blocks || !root->i_size) {
} else dput(sb->s_root);
printk(KERN_ERR "EXT3-fs: get root inode failed\n"); sb->s_root = NULL;
printk(KERN_ERR "EXT3-fs: corrupt root inode, run e2fsck\n");
goto failed_mount3; goto failed_mount3;
} }
......
...@@ -143,6 +143,7 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent) ...@@ -143,6 +143,7 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
struct vxfs_sb *rsbp; struct vxfs_sb *rsbp;
struct buffer_head *bp = NULL; struct buffer_head *bp = NULL;
u_long bsize; u_long bsize;
struct inode *root;
infp = kmalloc(sizeof(*infp), GFP_KERNEL); infp = kmalloc(sizeof(*infp), GFP_KERNEL);
if (!infp) { if (!infp) {
...@@ -208,8 +209,10 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent) ...@@ -208,8 +209,10 @@ static int vxfs_fill_super(struct super_block *sbp, void *dp, int silent)
} }
sbp->s_op = &vxfs_super_ops; sbp->s_op = &vxfs_super_ops;
sbp->s_root = d_alloc_root(iget(sbp, VXFS_ROOT_INO)); root = iget(sbp, VXFS_ROOT_INO);
sbp->s_root = d_alloc_root(root);
if (!sbp->s_root) { if (!sbp->s_root) {
iput(root);
printk(KERN_WARNING "vxfs: unable to get root dentry.\n"); printk(KERN_WARNING "vxfs: unable to get root dentry.\n");
goto out_free_ilist; goto out_free_ilist;
} }
......
...@@ -294,13 +294,15 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -294,13 +294,15 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
sb->s_root = d_alloc_root(root_inode); sb->s_root = d_alloc_root(root_inode);
if (!sb->s_root) if (!sb->s_root)
goto bail_no_root; goto bail_iput;
sb->s_root->d_op = &hfs_dentry_operations; sb->s_root->d_op = &hfs_dentry_operations;
/* everything's okay */ /* everything's okay */
return 0; return 0;
bail_iput:
iput(root_inode);
bail_no_root: bail_no_root:
hfs_warn("hfs_fs: get root inode failed.\n"); hfs_warn("hfs_fs: get root inode failed.\n");
hfs_mdb_put(sb); hfs_mdb_put(sb);
......
...@@ -278,6 +278,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) ...@@ -278,6 +278,7 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
struct hfsplus_sb_info *sbi; struct hfsplus_sb_info *sbi;
hfsplus_cat_entry entry; hfsplus_cat_entry entry;
struct hfs_find_data fd; struct hfs_find_data fd;
struct inode *root;
struct qstr str; struct qstr str;
int err = -EINVAL; int err = -EINVAL;
...@@ -364,10 +365,12 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) ...@@ -364,10 +365,12 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
} }
/* Load the root directory */ /* Load the root directory */
sb->s_root = d_alloc_root(iget(sb, HFSPLUS_ROOT_CNID)); root = iget(sb, HFSPLUS_ROOT_CNID);
sb->s_root = d_alloc_root(root);
if (!sb->s_root) { if (!sb->s_root) {
if (!silent) if (!silent)
printk("HFS+-fs: failed to load root directory\n"); printk("HFS+-fs: failed to load root directory\n");
iput(root);
goto cleanup; goto cleanup;
} }
......
...@@ -448,6 +448,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) ...@@ -448,6 +448,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
struct hpfs_super_block *superblock; struct hpfs_super_block *superblock;
struct hpfs_spare_block *spareblock; struct hpfs_spare_block *spareblock;
struct hpfs_sb_info *sbi; struct hpfs_sb_info *sbi;
struct inode *root;
uid_t uid; uid_t uid;
gid_t gid; gid_t gid;
...@@ -613,10 +614,11 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) ...@@ -613,10 +614,11 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
brelse(bh0); brelse(bh0);
hpfs_lock_iget(s, 1); hpfs_lock_iget(s, 1);
s->s_root = d_alloc_root(iget(s, sbi->sb_root)); root = iget(s, sbi->sb_root);
hpfs_unlock_iget(s); hpfs_unlock_iget(s);
if (!s->s_root || !s->s_root->d_inode) { s->s_root = d_alloc_root(root);
printk("HPFS: iget failed. Why???\n"); if (!s->s_root) {
iput(root);
goto bail0; goto bail0;
} }
hpfs_set_dentry_operations(s->s_root); hpfs_set_dentry_operations(s->s_root);
...@@ -627,22 +629,24 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) ...@@ -627,22 +629,24 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
root_dno = hpfs_fnode_dno(s, sbi->sb_root); root_dno = hpfs_fnode_dno(s, sbi->sb_root);
if (root_dno) if (root_dno)
de = map_dirent(s->s_root->d_inode, root_dno, "\001\001", 2, NULL, &qbh); de = map_dirent(root, root_dno, "\001\001", 2, NULL, &qbh);
if (!root_dno || !de) hpfs_error(s, "unable to find root dir"); if (!de)
hpfs_error(s, "unable to find root dir");
else { else {
s->s_root->d_inode->i_atime.tv_sec = local_to_gmt(s, de->read_date); root->i_atime.tv_sec = local_to_gmt(s, de->read_date);
s->s_root->d_inode->i_atime.tv_nsec = 0; root->i_atime.tv_nsec = 0;
s->s_root->d_inode->i_mtime.tv_sec = local_to_gmt(s, de->write_date); root->i_mtime.tv_sec = local_to_gmt(s, de->write_date);
s->s_root->d_inode->i_mtime.tv_nsec = 0; root->i_mtime.tv_nsec = 0;
s->s_root->d_inode->i_ctime.tv_sec = local_to_gmt(s, de->creation_date); root->i_ctime.tv_sec = local_to_gmt(s, de->creation_date);
s->s_root->d_inode->i_ctime.tv_nsec = 0; root->i_ctime.tv_nsec = 0;
hpfs_i(s->s_root->d_inode)->i_ea_size = de->ea_size; hpfs_i(root)->i_ea_size = de->ea_size;
hpfs_i(s->s_root->d_inode)->i_parent_dir = s->s_root->d_inode->i_ino; hpfs_i(root)->i_parent_dir = root->i_ino;
if (s->s_root->d_inode->i_size == -1) s->s_root->d_inode->i_size = 2048; if (root->i_size == -1)
if (s->s_root->d_inode->i_blocks == -1) s->s_root->d_inode->i_blocks = 5; root->i_size = 2048;
if (root->i_blocks == -1)
root->i_blocks = 5;
hpfs_brelse4(&qbh);
} }
if (de) hpfs_brelse4(&qbh);
return 0; return 0;
bail4: brelse(bh2); bail4: brelse(bh2);
......
...@@ -115,6 +115,7 @@ static int romfs_fill_super(struct super_block *s, void *data, int silent) ...@@ -115,6 +115,7 @@ static int romfs_fill_super(struct super_block *s, void *data, int silent)
{ {
struct buffer_head *bh; struct buffer_head *bh;
struct romfs_super_block *rsb; struct romfs_super_block *rsb;
struct inode *root;
int sz; int sz;
/* I would parse the options here, but there are none.. :) */ /* I would parse the options here, but there are none.. :) */
...@@ -154,23 +155,25 @@ static int romfs_fill_super(struct super_block *s, void *data, int silent) ...@@ -154,23 +155,25 @@ static int romfs_fill_super(struct super_block *s, void *data, int silent)
strnlen(rsb->name, ROMFS_MAXFN) + 1 + ROMFH_PAD) strnlen(rsb->name, ROMFS_MAXFN) + 1 + ROMFH_PAD)
& ROMFH_MASK; & ROMFH_MASK;
brelse(bh);
s->s_op = &romfs_ops; s->s_op = &romfs_ops;
root = iget(s, sz);
if (!root)
goto out;
s->s_root = d_alloc_root(iget(s, sz)); s->s_root = d_alloc_root(iget(s, sz));
if (!s->s_root) if (!s->s_root)
goto outnobh; goto outiput;
/* Ehrhm; sorry.. :) And thanks to Hans-Joachim Widmaier :) */ brelse(bh);
if (0) { return 0;
outiput:
iput(root);
out: out:
brelse(bh); brelse(bh);
outnobh: outnobh:
return -EINVAL; return -EINVAL;
}
return 0;
} }
/* That's simple too. */ /* That's simple too. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment