Skip to content

Commit

Permalink
ext4: remove dead code in ext4_has_free_blocks()
Browse files Browse the repository at this point in the history
percpu_counter_sum_positive() never returns a negative value.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Shaohua Li authored and Theodore Ts'o committed May 1, 2011
1 parent d9f3450 commit dc2070a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/ext4/balloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,6 @@ static int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
EXT4_FREEBLOCKS_WATERMARK) {
free_blocks = percpu_counter_sum_positive(fbc);
dirty_blocks = percpu_counter_sum_positive(dbc);
if (dirty_blocks < 0) {
printk(KERN_CRIT "Dirty block accounting "
"went wrong %lld\n",
(long long)dirty_blocks);
}
}
/* Check whether we have space after
* accounting for current dirty blocks & root reserved blocks.
Expand Down

0 comments on commit dc2070a

Please sign in to comment.