ext4: remove dead code in ext4_has_free_blocks()

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>
This commit is contained in:
Shaohua Li 2011-05-01 18:11:18 -04:00 committed by Theodore Ts'o
parent d9f34504e6
commit dc2070a241

View file

@ -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.