diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-03-08 21:05:08 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-03-08 21:05:08 -0500 |
commit | 9b1fc4e4973469dd3fab27ba5d78eca1cd5c13fe (patch) | |
tree | 0f51872d41cbc1e43db2fafab0074c107dfce7e7 /fs/nilfs2/inode.c | |
parent | 693dd321222f03b17668f88ceb0f7d518900191e (diff) |
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.c | 8 |
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 = { | |||
295 | struct inode *nilfs_new_inode(struct inode *dir, int mode) | 295 | struct inode *nilfs_new_inode(struct inode *dir, int mode) |
296 | { | 296 | { |
297 | struct super_block *sb = dir->i_sb; | 297 | struct super_block *sb = dir->i_sb; |
298 | struct nilfs_sb_info *sbi = NILFS_SB(sb); | 298 | struct the_nilfs *nilfs = NILFS_SB(sb)->s_nilfs; |
299 | struct inode *inode; | 299 | struct inode *inode; |
300 | struct nilfs_inode_info *ii; | 300 | struct nilfs_inode_info *ii; |
301 | struct nilfs_root *root; | 301 | struct nilfs_root *root; |
@@ -340,9 +340,9 @@ struct inode *nilfs_new_inode(struct inode *dir, int mode) | |||
340 | /* ii->i_dir_acl = 0; */ | 340 | /* ii->i_dir_acl = 0; */ |
341 | ii->i_dir_start_lookup = 0; | 341 | ii->i_dir_start_lookup = 0; |
342 | nilfs_set_inode_flags(inode); | 342 | nilfs_set_inode_flags(inode); |
343 | spin_lock(&sbi->s_next_gen_lock); | 343 | spin_lock(&nilfs->ns_next_gen_lock); |
344 | inode->i_generation = sbi->s_next_generation++; | 344 | inode->i_generation = nilfs->ns_next_generation++; |
345 | spin_unlock(&sbi->s_next_gen_lock); | 345 | spin_unlock(&nilfs->ns_next_gen_lock); |
346 | insert_inode_hash(inode); | 346 | insert_inode_hash(inode); |
347 | 347 | ||
348 | err = nilfs_init_acl(inode, dir); | 348 | err = nilfs_init_acl(inode, dir); |