summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2010-11-02 16:21:00 -0700
committerColin Cross <ccross@android.com>2010-11-02 16:21:00 -0700
commit02039465df5885728846005d3d7cb9742222c926 (patch)
tree1de708540cdb724122f6058ec404b11f27a76e65 /fs
parent62ce7a7f823cddb53e5e45f0644b5277581269db (diff)
parentff23269fde09a3749ea6f0714d2b17b1a0d7882c (diff)
Merge branch 'android-2.6.36' into android-tegra-2.6.36
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/super.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 26147746c272..84b0ef45e24e 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3523,9 +3523,12 @@ static int ext4_commit_super(struct super_block *sb, int sync)
else
es->s_kbytes_written =
cpu_to_le64(EXT4_SB(sb)->s_kbytes_written);
- ext4_free_blocks_count_set(es, percpu_counter_sum_positive(
+ if (percpu_counter_initialized(&EXT4_SB(sb)->s_freeblocks_counter))
+ ext4_free_blocks_count_set(es, percpu_counter_sum_positive(
&EXT4_SB(sb)->s_freeblocks_counter));
- es->s_free_inodes_count = cpu_to_le32(percpu_counter_sum_positive(
+ if (percpu_counter_initialized(&EXT4_SB(sb)->s_freeinodes_counter))
+ es->s_free_inodes_count =
+ cpu_to_le32(percpu_counter_sum_positive(
&EXT4_SB(sb)->s_freeinodes_counter));
sb->s_dirt = 0;
BUFFER_TRACE(sbh, "marking dirty");