Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154097
b: refs/heads/master
c: 3391faa
h: refs/heads/master
i:
  154095: 9c95029
v: v3
  • Loading branch information
Roel Kluin authored and Jan Kara committed Jun 24, 2009
1 parent c5ebff1 commit f321400
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24a5d59f3477bcff4c069ff4d0ca9a3e037d0235
refs/heads/master: 3391faa4f18e4e33666d3d24e90e3086fcf9b922
9 changes: 4 additions & 5 deletions trunk/fs/udf/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static int udf_bitmap_prealloc_blocks(struct super_block *sb,

mutex_lock(&sbi->s_alloc_mutex);
part_len = sbi->s_partmaps[partition].s_partition_len;
if (first_block < 0 || first_block >= part_len)
if (first_block >= part_len)
goto out;

if (first_block + block_count > part_len)
Expand Down Expand Up @@ -297,7 +297,7 @@ static int udf_bitmap_new_block(struct super_block *sb,
mutex_lock(&sbi->s_alloc_mutex);

repeat:
if (goal < 0 || goal >= sbi->s_partmaps[partition].s_partition_len)
if (goal >= sbi->s_partmaps[partition].s_partition_len)
goal = 0;

nr_groups = bitmap->s_nr_groups;
Expand Down Expand Up @@ -666,8 +666,7 @@ static int udf_table_prealloc_blocks(struct super_block *sb,
int8_t etype = -1;
struct udf_inode_info *iinfo;

if (first_block < 0 ||
first_block >= sbi->s_partmaps[partition].s_partition_len)
if (first_block >= sbi->s_partmaps[partition].s_partition_len)
return 0;

iinfo = UDF_I(table);
Expand Down Expand Up @@ -743,7 +742,7 @@ static int udf_table_new_block(struct super_block *sb,
return newblock;

mutex_lock(&sbi->s_alloc_mutex);
if (goal < 0 || goal >= sbi->s_partmaps[partition].s_partition_len)
if (goal >= sbi->s_partmaps[partition].s_partition_len)
goal = 0;

/* We search for the closest matching block to goal. If we find
Expand Down

0 comments on commit f321400

Please sign in to comment.