diff options
author | Vyacheslav Dubeyko <slava@dubeyko.com> | 2013-07-03 18:08:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:08:01 -0400 |
commit | e5f7f84843154db8b6ef5b2ac5e286f72212f54e (patch) | |
tree | e3d11da3a3b6bb3777998b9bc2919e48d47cddf6 /fs/nilfs2/super.c | |
parent | c7ef972c440fc9f1eda28b450cd30ad15c4d60cf (diff) |
] nilfs2: use atomic64_t type for inodes_count and blocks_count fields in nilfs_root struct
The cp_inodes_count and cp_blocks_count are represented as __le64 type in
on-disk structure (struct nilfs_checkpoint). But analogous fields in
in-core structure (struct nilfs_root) are represented by atomic_t type.
This patch replaces atomic_t on atomic64_t type in representation of
inodes_count and blocks_count fields in struct nilfs_root.
Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Acked-by: Joern Engel <joern@logfs.org>
Cc: Clemens Eisserer <linuxhippy@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r-- | fs/nilfs2/super.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 7d257e78fbad..1427de5ebf4d 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -554,8 +554,10 @@ int nilfs_attach_checkpoint(struct super_block *sb, __u64 cno, int curr_mnt, | |||
554 | if (err) | 554 | if (err) |
555 | goto failed_bh; | 555 | goto failed_bh; |
556 | 556 | ||
557 | atomic_set(&root->inodes_count, le64_to_cpu(raw_cp->cp_inodes_count)); | 557 | atomic64_set(&root->inodes_count, |
558 | atomic_set(&root->blocks_count, le64_to_cpu(raw_cp->cp_blocks_count)); | 558 | le64_to_cpu(raw_cp->cp_inodes_count)); |
559 | atomic64_set(&root->blocks_count, | ||
560 | le64_to_cpu(raw_cp->cp_blocks_count)); | ||
559 | 561 | ||
560 | nilfs_cpfile_put_checkpoint(nilfs->ns_cpfile, cno, bh_cp); | 562 | nilfs_cpfile_put_checkpoint(nilfs->ns_cpfile, cno, bh_cp); |
561 | 563 | ||
@@ -647,7 +649,7 @@ static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
647 | * curent inodes count as maximum possible and | 649 | * curent inodes count as maximum possible and |
648 | * zero as free inodes value. | 650 | * zero as free inodes value. |
649 | */ | 651 | */ |
650 | nmaxinodes = atomic_read(&root->inodes_count); | 652 | nmaxinodes = atomic64_read(&root->inodes_count); |
651 | nfreeinodes = 0; | 653 | nfreeinodes = 0; |
652 | err = 0; | 654 | err = 0; |
653 | } else | 655 | } else |