summaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-21 22:00:56 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-21 22:00:56 +0000
commit168660f24dfc46c2702acbe4701a446f42a59578 (patch)
treef431368afbf6b1b71809cf3fd904d800ea126f4d /fs/ext2
parent6420f767924fa73b0ea267864d96820815f4ba5a (diff)
Merge with Linux 2.4.0-test5-pre3.
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/file.c3
-rw-r--r--fs/ext2/super.c12
2 files changed, 6 insertions, 9 deletions
diff --git a/fs/ext2/file.c b/fs/ext2/file.c
index f591203c4..1b9983e24 100644
--- a/fs/ext2/file.c
+++ b/fs/ext2/file.c
@@ -90,7 +90,8 @@ static int ext2_release_file (struct inode * inode, struct file * filp)
*/
static int ext2_open_file (struct inode * inode, struct file * filp)
{
- if (inode->u.ext2_i.i_high_size && !(filp->f_flags & O_LARGEFILE))
+ if (!(filp->f_flags & O_LARGEFILE) &&
+ inode->i_size > 0x7FFFFFFFLL)
return -EFBIG;
return 0;
}
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 19511a1fe..1ba0b0f79 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -107,8 +107,7 @@ void ext2_put_super (struct super_block * sb)
for (i = 0; i < db_count; i++)
if (sb->u.ext2_sb.s_group_desc[i])
brelse (sb->u.ext2_sb.s_group_desc[i]);
- kfree_s (sb->u.ext2_sb.s_group_desc,
- db_count * sizeof (struct buffer_head *));
+ kfree(sb->u.ext2_sb.s_group_desc);
for (i = 0; i < EXT2_MAX_GROUP_LOADED; i++)
if (sb->u.ext2_sb.s_inode_bitmap[i])
brelse (sb->u.ext2_sb.s_inode_bitmap[i]);
@@ -567,8 +566,7 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
if (!sb->u.ext2_sb.s_group_desc[i]) {
for (j = 0; j < i; j++)
brelse (sb->u.ext2_sb.s_group_desc[j]);
- kfree_s (sb->u.ext2_sb.s_group_desc,
- db_count * sizeof (struct buffer_head *));
+ kfree(sb->u.ext2_sb.s_group_desc);
printk ("EXT2-fs: unable to read group descriptors\n");
goto failed_mount;
}
@@ -576,8 +574,7 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
if (!ext2_check_descriptors (sb)) {
for (j = 0; j < db_count; j++)
brelse (sb->u.ext2_sb.s_group_desc[j]);
- kfree_s (sb->u.ext2_sb.s_group_desc,
- db_count * sizeof (struct buffer_head *));
+ kfree(sb->u.ext2_sb.s_group_desc);
printk ("EXT2-fs: group descriptors corrupted !\n");
goto failed_mount;
}
@@ -599,8 +596,7 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
for (i = 0; i < db_count; i++)
if (sb->u.ext2_sb.s_group_desc[i])
brelse (sb->u.ext2_sb.s_group_desc[i]);
- kfree_s (sb->u.ext2_sb.s_group_desc,
- db_count * sizeof (struct buffer_head *));
+ kfree(sb->u.ext2_sb.s_group_desc);
brelse (bh);
printk ("EXT2-fs: get root inode failed\n");
return NULL;