ext4: remove dead code in ext4_has_free_blocks()
authorShaohua Li <shaohua.li@intel.com>
Sun, 1 May 2011 22:11:18 +0000 (18:11 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 1 May 2011 22:11:18 +0000 (18:11 -0400)
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>
fs/ext4/balloc.c

index 1c67139ad4b422119c76d10f384dad9eabdf9158..9c6cd51c09e3ccaaabd1ee8f4a0ebeca1518df1c 100644 (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.