diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-04-21 03:47:00 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-21 03:47:05 -0400 |
commit | ac0053fd51d2bac09a7d4b4a59f6dac863bd4373 (patch) | |
tree | 00c32e14428853f352fa3828d0131653ad6a7c69 /fs/udf/balloc.c | |
parent | b15c7b1cee119999e9eafcd602d24a595e77adac (diff) | |
parent | 01bf0b64579ead8a82e7cfc32ae44bc667e7ad0f (diff) |
Merge commit 'v2.6.34-rc5' into tracing/core
Merge reason: pick up latest -rc's.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'fs/udf/balloc.c')
-rw-r--r-- | fs/udf/balloc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index 19626e2491c4..9a9378b4eb5a 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c | |||
@@ -125,9 +125,8 @@ static void udf_bitmap_free_blocks(struct super_block *sb, | |||
125 | 125 | ||
126 | mutex_lock(&sbi->s_alloc_mutex); | 126 | mutex_lock(&sbi->s_alloc_mutex); |
127 | partmap = &sbi->s_partmaps[bloc->partitionReferenceNum]; | 127 | partmap = &sbi->s_partmaps[bloc->partitionReferenceNum]; |
128 | if (bloc->logicalBlockNum < 0 || | 128 | if (bloc->logicalBlockNum + count < count || |
129 | (bloc->logicalBlockNum + count) > | 129 | (bloc->logicalBlockNum + count) > partmap->s_partition_len) { |
130 | partmap->s_partition_len) { | ||
131 | udf_debug("%d < %d || %d + %d > %d\n", | 130 | udf_debug("%d < %d || %d + %d > %d\n", |
132 | bloc->logicalBlockNum, 0, bloc->logicalBlockNum, | 131 | bloc->logicalBlockNum, 0, bloc->logicalBlockNum, |
133 | count, partmap->s_partition_len); | 132 | count, partmap->s_partition_len); |
@@ -393,9 +392,8 @@ static void udf_table_free_blocks(struct super_block *sb, | |||
393 | 392 | ||
394 | mutex_lock(&sbi->s_alloc_mutex); | 393 | mutex_lock(&sbi->s_alloc_mutex); |
395 | partmap = &sbi->s_partmaps[bloc->partitionReferenceNum]; | 394 | partmap = &sbi->s_partmaps[bloc->partitionReferenceNum]; |
396 | if (bloc->logicalBlockNum < 0 || | 395 | if (bloc->logicalBlockNum + count < count || |
397 | (bloc->logicalBlockNum + count) > | 396 | (bloc->logicalBlockNum + count) > partmap->s_partition_len) { |
398 | partmap->s_partition_len) { | ||
399 | udf_debug("%d < %d || %d + %d > %d\n", | 397 | udf_debug("%d < %d || %d + %d > %d\n", |
400 | bloc->logicalBlockNum, 0, bloc->logicalBlockNum, count, | 398 | bloc->logicalBlockNum, 0, bloc->logicalBlockNum, count, |
401 | partmap->s_partition_len); | 399 | partmap->s_partition_len); |