--- zzzz-none-000/linux-2.6.19.2/fs/udf/balloc.c 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/fs/udf/balloc.c 2007-01-19 14:42:56.000000000 +0000 @@ -153,8 +153,7 @@ unsigned long overflow; mutex_lock(&sbi->s_alloc_mutex); - if (bloc.logicalBlockNum < 0 || - (bloc.logicalBlockNum + count) > UDF_SB_PARTLEN(sb, bloc.partitionReferenceNum)) + if (bloc.logicalBlockNum + count > UDF_SB_PARTLEN(sb, bloc.partitionReferenceNum)) { udf_debug("%d < %d || %d + %d > %d\n", bloc.logicalBlockNum, 0, bloc.logicalBlockNum, count, @@ -227,7 +226,7 @@ struct buffer_head *bh; mutex_lock(&sbi->s_alloc_mutex); - if (first_block < 0 || first_block >= UDF_SB_PARTLEN(sb, partition)) + if (first_block >= UDF_SB_PARTLEN(sb, partition)) goto out; if (first_block + block_count > UDF_SB_PARTLEN(sb, partition)) @@ -294,7 +293,7 @@ mutex_lock(&sbi->s_alloc_mutex); repeat: - if (goal < 0 || goal >= UDF_SB_PARTLEN(sb, partition)) + if (goal >= UDF_SB_PARTLEN(sb, partition)) goal = 0; nr_groups = bitmap->s_nr_groups; @@ -434,8 +433,7 @@ int i; mutex_lock(&sbi->s_alloc_mutex); - if (bloc.logicalBlockNum < 0 || - (bloc.logicalBlockNum + count) > UDF_SB_PARTLEN(sb, bloc.partitionReferenceNum)) + if (bloc.logicalBlockNum + count > UDF_SB_PARTLEN(sb, bloc.partitionReferenceNum)) { udf_debug("%d < %d || %d + %d > %d\n", bloc.logicalBlockNum, 0, bloc.logicalBlockNum, count, @@ -682,7 +680,7 @@ struct buffer_head *bh; int8_t etype = -1; - if (first_block < 0 || first_block >= UDF_SB_PARTLEN(sb, partition)) + if (first_block >= UDF_SB_PARTLEN(sb, partition)) return 0; if (UDF_I_ALLOCTYPE(table) == ICBTAG_FLAG_AD_SHORT) @@ -762,7 +760,7 @@ return newblock; mutex_lock(&sbi->s_alloc_mutex); - if (goal < 0 || goal >= UDF_SB_PARTLEN(sb, partition)) + if (goal >= UDF_SB_PARTLEN(sb, partition)) goal = 0; /* We search for the closest matching block to goal. If we find a exact hit,