From b7c0634204993d7c6678c852e4bd118426599111 Mon Sep 17 00:00:00 2001 From: Ryusuke Konishi Date: Sat, 14 Aug 2010 14:48:32 +0900 Subject: nilfs2: move inode count and block count into root object This moves sbi->s_inodes_count and sbi->s_blocks_count into nilfs_root object. Signed-off-by: Ryusuke Konishi --- fs/nilfs2/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/nilfs2/inode.c') diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 7e883d5a5033..ca09e4362d66 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c @@ -306,7 +306,7 @@ struct inode *nilfs_new_inode(struct inode *dir, int mode) goto failed_ifile_create_inode; /* reference count of i_bh inherits from nilfs_mdt_read_block() */ - atomic_inc(&sbi->s_inodes_count); + atomic_inc(&root->inodes_count); inode_init_owner(inode, dir, mode); inode->i_ino = ino; inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; @@ -715,7 +715,7 @@ void nilfs_evict_inode(struct inode *inode) end_writeback(inode); nilfs_ifile_delete_inode(ii->i_root->ifile, inode->i_ino); - atomic_dec(&NILFS_SB(sb)->s_inodes_count); + atomic_dec(&ii->i_root->inodes_count); nilfs_clear_inode(inode); -- cgit v1.2.1