diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-01-04 16:03:48 +0000 |
commit | 78c388aed2b7184182c08428db1de6c872d815f5 (patch) | |
tree | 4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /fs/ext2/balloc.c | |
parent | eb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff) |
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'fs/ext2/balloc.c')
-rw-r--r-- | fs/ext2/balloc.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 8f69f0baf..2c7ba02d7 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -86,11 +86,12 @@ static int read_block_bitmap (struct super_block * sb, { struct ext2_group_desc * gdp; struct buffer_head * bh = NULL; - int retval = 0; + int retval = -EIO; gdp = ext2_get_group_desc (sb, block_group, NULL); if (!gdp) goto error_out; + retval = 0; bh = bread (sb->s_dev, le32_to_cpu(gdp->bg_block_bitmap), sb->s_blocksize); if (!bh) { ext2_error (sb, "read_block_bitmap", @@ -686,6 +687,12 @@ static int test_root(int a, int b) } } +int ext2_group_sparse(int group) +{ + return (test_root(group, 3) || test_root(group, 5) || + test_root(group, 7)); +} + void ext2_check_blocks_bitmap (struct super_block * sb) { struct buffer_head * bh; @@ -714,9 +721,9 @@ void ext2_check_blocks_bitmap (struct super_block * sb) bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; - if (!(le32_to_cpu(sb->u.ext2_sb.s_feature_ro_compat) & + if (!(sb->u.ext2_sb.s_feature_ro_compat & EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) || - (test_root(i, 3) || test_root(i, 5) || test_root(i, 7))) { + ext2_group_sparse(i)) { if (!ext2_test_bit (0, bh->b_data)) ext2_error (sb, "ext2_check_blocks_bitmap", "Superblock in group %d " |