Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71083
b: refs/heads/master
c: 6bc9fef
h: refs/heads/master
i:
  71081: 5dcb396
  71079: 6564cb3
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Theodore Ts'o committed Oct 17, 2007
1 parent 82ed640 commit 3e97510
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5272f8372786a181313c00c7a67304ac6def2e34
refs/heads/master: 6bc9feff14a2524c4bb2bac533dfd874b1533e20
4 changes: 2 additions & 2 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -2667,7 +2667,7 @@ static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf)

if (test_opt(sb, MINIX_DF)) {
sbi->s_overhead_last = 0;
} else if (sbi->s_blocks_last != le32_to_cpu(es->s_blocks_count)) {
} else if (sbi->s_blocks_last != ext4_blocks_count(es)) {
unsigned long ngroups = sbi->s_groups_count, i;
ext4_fsblk_t overhead = 0;
smp_rmb();
Expand Down Expand Up @@ -2702,7 +2702,7 @@ static int ext4_statfs (struct dentry * dentry, struct kstatfs * buf)
overhead += ngroups * (2 + sbi->s_itb_per_group);
sbi->s_overhead_last = overhead;
smp_wmb();
sbi->s_blocks_last = le32_to_cpu(es->s_blocks_count);
sbi->s_blocks_last = ext4_blocks_count(es);
}

buf->f_type = EXT4_SUPER_MAGIC;
Expand Down
6 changes: 3 additions & 3 deletions trunk/include/linux/ext4_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ do { \
*/
struct ext4_super_block {
/*00*/ __le32 s_inodes_count; /* Inodes count */
__le32 s_blocks_count; /* Blocks count */
__le32 s_blocks_count_lo; /* Blocks count */
__le32 s_r_blocks_count; /* Reserved blocks count */
__le32 s_free_blocks_count; /* Free blocks count */
/*10*/ __le32 s_free_inodes_count; /* Free inodes count */
Expand Down Expand Up @@ -981,7 +981,7 @@ extern void ext4_inode_table_set(struct super_block *sb,
static inline ext4_fsblk_t ext4_blocks_count(struct ext4_super_block *es)
{
return ((ext4_fsblk_t)le32_to_cpu(es->s_blocks_count_hi) << 32) |
le32_to_cpu(es->s_blocks_count);
le32_to_cpu(es->s_blocks_count_lo);
}

static inline ext4_fsblk_t ext4_r_blocks_count(struct ext4_super_block *es)
Expand All @@ -999,7 +999,7 @@ static inline ext4_fsblk_t ext4_free_blocks_count(struct ext4_super_block *es)
static inline void ext4_blocks_count_set(struct ext4_super_block *es,
ext4_fsblk_t blk)
{
es->s_blocks_count = cpu_to_le32((u32)blk);
es->s_blocks_count_lo = cpu_to_le32((u32)blk);
es->s_blocks_count_hi = cpu_to_le32(blk >> 32);
}

Expand Down

0 comments on commit 3e97510

Please sign in to comment.