nilfs2: separate initializer of metadata file inode

This separates a part of initialization code of metadata file inode,
and makes it available from the nilfs iget function that a later patch
will add to.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
This commit is contained in:
Ryusuke Konishi
2010-08-21 22:01:51 +09:00
parent 0e14a3595b
commit 5e19a995f4
3 changed files with 35 additions and 19 deletions

View File

@@ -225,10 +225,14 @@ static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino,
struct inode *inode;
struct nilfs_inode_info *ii;
inode = nilfs_mdt_new_common(nilfs, NULL, ino, GFP_NOFS, 0);
inode = nilfs_mdt_new_common(nilfs, NULL, ino);
if (!inode)
return NULL;
if (nilfs_mdt_init(inode, nilfs, GFP_NOFS, 0) < 0) {
nilfs_destroy_inode(inode);
return NULL;
}
inode->i_op = NULL;
inode->i_fop = NULL;
inode->i_mapping->a_ops = &def_gcinode_aops;