Skip to content

Commit

Permalink
ext4: remove redundant test on unsigned
Browse files Browse the repository at this point in the history
unsigned i_block cannot be less than 0.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Roel Kluin authored and Theodore Ts'o committed Aug 11, 2009
1 parent 785b4b3 commit c333e07
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ static int ext4_block_to_path(struct inode *inode,
int n = 0;
int final = 0;

if (i_block < 0) {
ext4_warning(inode->i_sb, "ext4_block_to_path", "block < 0");
} else if (i_block < direct_blocks) {
if (i_block < direct_blocks) {
offsets[n++] = i_block;
final = direct_blocks;
} else if ((i_block -= direct_blocks) < indirect_blocks) {
Expand Down

0 comments on commit c333e07

Please sign in to comment.