lib: percpu_counter_add
[deliverable/linux.git] / fs / ext2 / balloc.c
index d4870432ecfc9be0d6d3b35807a57501c2d517f6..53be251585603067c515f14bef2109b4ca34b64a 100644 (file)
@@ -29,7 +29,7 @@
  * The file system contains group descriptors which are located after the
  * super block.  Each descriptor contains the number of the bitmap block and
  * the free blocks count in the block.  The descriptors are loaded in memory
- * when a file system is mounted (see ext2_read_super).
+ * when a file system is mounted (see ext2_fill_super).
  */
 
 
@@ -124,7 +124,7 @@ static int reserve_blocks(struct super_block *sb, int count)
                        return 0;
        }
 
-       percpu_counter_mod(&sbi->s_freeblocks_counter, -count);
+       percpu_counter_add(&sbi->s_freeblocks_counter, -count);
        sb->s_dirt = 1;
        return count;
 }
@@ -134,7 +134,7 @@ static void release_blocks(struct super_block *sb, int count)
        if (count) {
                struct ext2_sb_info *sbi = EXT2_SB(sb);
 
-               percpu_counter_mod(&sbi->s_freeblocks_counter, count);
+               percpu_counter_add(&sbi->s_freeblocks_counter, count);
                sb->s_dirt = 1;
        }
 }
@@ -539,7 +539,6 @@ unsigned long ext2_count_free (struct buffer_head * map, unsigned int numchars)
 
 #endif  /*  EXT2FS_DEBUG  */
 
-/* Superblock must be locked */
 unsigned long ext2_count_free_blocks (struct super_block * sb)
 {
        struct ext2_group_desc * desc;
This page took 0.03518 seconds and 5 git commands to generate.