summaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/inode.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-09 11:05:08 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-09 11:05:08 +0900
commit9b1fc4e4973469dd3fab27ba5d78eca1cd5c13fe (patch)
tree0f51872d41cbc1e43db2fafab0074c107dfce7e7 /fs/nilfs2/inode.c
parent693dd321222f03b17668f88ceb0f7d518900191e (diff)
downloadtalos-obmc-linux-9b1fc4e4973469dd3fab27ba5d78eca1cd5c13fe.tar.gz
talos-obmc-linux-9b1fc4e4973469dd3fab27ba5d78eca1cd5c13fe.zip
nilfs2: move next generation counter into nilfs object
Moves s_next_generation counter and a spinlock protecting it to nilfs object from nilfs_sb_info structure. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/inode.c')
-rw-r--r--fs/nilfs2/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index dd5d6d633ea1..7a3dbe4f229c 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -295,7 +295,7 @@ const struct address_space_operations nilfs_aops = {
struct inode *nilfs_new_inode(struct inode *dir, int mode)
{
struct super_block *sb = dir->i_sb;
- struct nilfs_sb_info *sbi = NILFS_SB(sb);
+ struct the_nilfs *nilfs = NILFS_SB(sb)->s_nilfs;
struct inode *inode;
struct nilfs_inode_info *ii;
struct nilfs_root *root;
@@ -340,9 +340,9 @@ struct inode *nilfs_new_inode(struct inode *dir, int mode)
/* ii->i_dir_acl = 0; */
ii->i_dir_start_lookup = 0;
nilfs_set_inode_flags(inode);
- spin_lock(&sbi->s_next_gen_lock);
- inode->i_generation = sbi->s_next_generation++;
- spin_unlock(&sbi->s_next_gen_lock);
+ spin_lock(&nilfs->ns_next_gen_lock);
+ inode->i_generation = nilfs->ns_next_generation++;
+ spin_unlock(&nilfs->ns_next_gen_lock);
insert_inode_hash(inode);
err = nilfs_init_acl(inode, dir);
OpenPOWER on IntegriCloud