diff options
author | Len Brown <len.brown@intel.com> | 2010-08-15 01:06:31 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2010-08-15 01:06:31 -0400 |
commit | 95ee46aa8698f2000647dfb362400fadbb5807cf (patch) | |
tree | e5a05c7297f997e191c73091934e42e3195c0e40 /fs/ext4/block_validity.c | |
parent | cfa806f059801dbe7e435745eb2e187c8bfe1e7f (diff) | |
parent | 92fa5bd9a946b6e7aab6764e7312e4e3d9bed295 (diff) |
Merge branch 'linus' into release
Conflicts:
drivers/acpi/debug.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'fs/ext4/block_validity.c')
-rw-r--r-- | fs/ext4/block_validity.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ext4/block_validity.c b/fs/ext4/block_validity.c index 5b6973fbf1bd..3db5084db9bd 100644 --- a/fs/ext4/block_validity.c +++ b/fs/ext4/block_validity.c | |||
@@ -229,16 +229,20 @@ int ext4_data_block_valid(struct ext4_sb_info *sbi, ext4_fsblk_t start_blk, | |||
229 | 229 | ||
230 | if ((start_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) || | 230 | if ((start_blk <= le32_to_cpu(sbi->s_es->s_first_data_block)) || |
231 | (start_blk + count < start_blk) || | 231 | (start_blk + count < start_blk) || |
232 | (start_blk + count > ext4_blocks_count(sbi->s_es))) | 232 | (start_blk + count > ext4_blocks_count(sbi->s_es))) { |
233 | sbi->s_es->s_last_error_block = cpu_to_le64(start_blk); | ||
233 | return 0; | 234 | return 0; |
235 | } | ||
234 | while (n) { | 236 | while (n) { |
235 | entry = rb_entry(n, struct ext4_system_zone, node); | 237 | entry = rb_entry(n, struct ext4_system_zone, node); |
236 | if (start_blk + count - 1 < entry->start_blk) | 238 | if (start_blk + count - 1 < entry->start_blk) |
237 | n = n->rb_left; | 239 | n = n->rb_left; |
238 | else if (start_blk >= (entry->start_blk + entry->count)) | 240 | else if (start_blk >= (entry->start_blk + entry->count)) |
239 | n = n->rb_right; | 241 | n = n->rb_right; |
240 | else | 242 | else { |
243 | sbi->s_es->s_last_error_block = cpu_to_le64(start_blk); | ||
241 | return 0; | 244 | return 0; |
245 | } | ||
242 | } | 246 | } |
243 | return 1; | 247 | return 1; |
244 | } | 248 | } |