[PATCH 2/2] ext3 free blocks counter initialization fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[PATCH 2] - Change ext3 to make use of the new percpu counter initialize
routine to init the free blocks counter, instead of using
percpu_counter_mod() indirectly.


Signed-Off-By: Mingming Cao <[email protected]>

---

 linux-2.6.16-cmm/fs/ext3/super.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff -puN fs/ext3/super.c~ext3_64bit_percpu_counter_fix fs/ext3/super.c
--- linux-2.6.16/fs/ext3/super.c~ext3_64bit_percpu_counter_fix
2006-04-21 00:02:45.000000000 -0700
+++ linux-2.6.16-cmm/fs/ext3/super.c	2006-04-21 00:02:45.000000000 -0700
@@ -1583,9 +1583,6 @@ static int ext3_fill_super (struct super
 		goto failed_mount;
 	}
 
-	percpu_counter_init(&sbi->s_freeblocks_counter);
-	percpu_counter_init(&sbi->s_freeinodes_counter);
-	percpu_counter_init(&sbi->s_dirs_counter);
 	bgl_lock_init(&sbi->s_blockgroup_lock);
 
 	for (i = 0; i < db_count; i++) {
@@ -1727,11 +1724,11 @@ static int ext3_fill_super (struct super
 		test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered":
 		"writeback");
 
-	percpu_counter_mod(&sbi->s_freeblocks_counter,
+	percpu_counter_ll_init(&sbi->s_freeblocks_counter,
 		ext3_count_free_blocks(sb));
-	percpu_counter_mod(&sbi->s_freeinodes_counter,
+	percpu_counter_ll_init(&sbi->s_freeinodes_counter,
 		ext3_count_free_inodes(sb));
-	percpu_counter_mod(&sbi->s_dirs_counter,
+	percpu_counter_ll_init(&sbi->s_dirs_counter,
 		ext3_count_dirs(sb));
 
 	lock_kernel();

_


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux