diff options
Diffstat (limited to 'fs/ext3/balloc.c')
-rw-r--r-- | fs/ext3/balloc.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c index da0cb2c0e437..92fd0338a6eb 100644 --- a/fs/ext3/balloc.c +++ b/fs/ext3/balloc.c | |||
@@ -117,7 +117,7 @@ static int ext3_valid_block_bitmap(struct super_block *sb, | |||
117 | return 1; | 117 | return 1; |
118 | 118 | ||
119 | err_out: | 119 | err_out: |
120 | ext3_error(sb, __FUNCTION__, | 120 | ext3_error(sb, __func__, |
121 | "Invalid block bitmap - " | 121 | "Invalid block bitmap - " |
122 | "block_group = %d, block = %lu", | 122 | "block_group = %d, block = %lu", |
123 | block_group, bitmap_blk); | 123 | block_group, bitmap_blk); |
@@ -147,7 +147,7 @@ read_block_bitmap(struct super_block *sb, unsigned int block_group) | |||
147 | bitmap_blk = le32_to_cpu(desc->bg_block_bitmap); | 147 | bitmap_blk = le32_to_cpu(desc->bg_block_bitmap); |
148 | bh = sb_getblk(sb, bitmap_blk); | 148 | bh = sb_getblk(sb, bitmap_blk); |
149 | if (unlikely(!bh)) { | 149 | if (unlikely(!bh)) { |
150 | ext3_error(sb, __FUNCTION__, | 150 | ext3_error(sb, __func__, |
151 | "Cannot read block bitmap - " | 151 | "Cannot read block bitmap - " |
152 | "block_group = %d, block_bitmap = %u", | 152 | "block_group = %d, block_bitmap = %u", |
153 | block_group, le32_to_cpu(desc->bg_block_bitmap)); | 153 | block_group, le32_to_cpu(desc->bg_block_bitmap)); |
@@ -158,16 +158,17 @@ read_block_bitmap(struct super_block *sb, unsigned int block_group) | |||
158 | 158 | ||
159 | if (bh_submit_read(bh) < 0) { | 159 | if (bh_submit_read(bh) < 0) { |
160 | brelse(bh); | 160 | brelse(bh); |
161 | ext3_error(sb, __FUNCTION__, | 161 | ext3_error(sb, __func__, |
162 | "Cannot read block bitmap - " | 162 | "Cannot read block bitmap - " |
163 | "block_group = %d, block_bitmap = %u", | 163 | "block_group = %d, block_bitmap = %u", |
164 | block_group, le32_to_cpu(desc->bg_block_bitmap)); | 164 | block_group, le32_to_cpu(desc->bg_block_bitmap)); |
165 | return NULL; | 165 | return NULL; |
166 | } | 166 | } |
167 | if (!ext3_valid_block_bitmap(sb, desc, block_group, bh)) { | 167 | ext3_valid_block_bitmap(sb, desc, block_group, bh); |
168 | brelse(bh); | 168 | /* |
169 | return NULL; | 169 | * file system mounted not to panic on error, continue with corrupt |
170 | } | 170 | * bitmap |
171 | */ | ||
171 | return bh; | 172 | return bh; |
172 | } | 173 | } |
173 | /* | 174 | /* |
@@ -232,11 +233,10 @@ restart: | |||
232 | prev = rsv; | 233 | prev = rsv; |
233 | } | 234 | } |
234 | printk("Window map complete.\n"); | 235 | printk("Window map complete.\n"); |
235 | if (bad) | 236 | BUG_ON(bad); |
236 | BUG(); | ||
237 | } | 237 | } |
238 | #define rsv_window_dump(root, verbose) \ | 238 | #define rsv_window_dump(root, verbose) \ |
239 | __rsv_window_dump((root), (verbose), __FUNCTION__) | 239 | __rsv_window_dump((root), (verbose), __func__) |
240 | #else | 240 | #else |
241 | #define rsv_window_dump(root, verbose) do {} while (0) | 241 | #define rsv_window_dump(root, verbose) do {} while (0) |
242 | #endif | 242 | #endif |
@@ -618,7 +618,7 @@ do_more: | |||
618 | if (!ext3_clear_bit_atomic(sb_bgl_lock(sbi, block_group), | 618 | if (!ext3_clear_bit_atomic(sb_bgl_lock(sbi, block_group), |
619 | bit + i, bitmap_bh->b_data)) { | 619 | bit + i, bitmap_bh->b_data)) { |
620 | jbd_unlock_bh_state(bitmap_bh); | 620 | jbd_unlock_bh_state(bitmap_bh); |
621 | ext3_error(sb, __FUNCTION__, | 621 | ext3_error(sb, __func__, |
622 | "bit already cleared for block "E3FSBLK, | 622 | "bit already cleared for block "E3FSBLK, |
623 | block + i); | 623 | block + i); |
624 | jbd_lock_bh_state(bitmap_bh); | 624 | jbd_lock_bh_state(bitmap_bh); |
@@ -1642,7 +1642,11 @@ allocated: | |||
1642 | "Allocating block in system zone - " | 1642 | "Allocating block in system zone - " |
1643 | "blocks from "E3FSBLK", length %lu", | 1643 | "blocks from "E3FSBLK", length %lu", |
1644 | ret_block, num); | 1644 | ret_block, num); |
1645 | goto out; | 1645 | /* |
1646 | * claim_block() marked the blocks we allocated as in use. So we | ||
1647 | * may want to selectively mark some of the blocks as free. | ||
1648 | */ | ||
1649 | goto retry_alloc; | ||
1646 | } | 1650 | } |
1647 | 1651 | ||
1648 | performed_allocation = 1; | 1652 | performed_allocation = 1; |
@@ -1668,7 +1672,7 @@ allocated: | |||
1668 | if (ext3_test_bit(grp_alloc_blk+i, | 1672 | if (ext3_test_bit(grp_alloc_blk+i, |
1669 | bh2jh(bitmap_bh)->b_committed_data)) { | 1673 | bh2jh(bitmap_bh)->b_committed_data)) { |
1670 | printk("%s: block was unexpectedly set in " | 1674 | printk("%s: block was unexpectedly set in " |
1671 | "b_committed_data\n", __FUNCTION__); | 1675 | "b_committed_data\n", __func__); |
1672 | } | 1676 | } |
1673 | } | 1677 | } |
1674 | } | 1678 | } |