- if (nilfs->ns_gc_inodes_h) {
- nilfs_remove_all_gcinode(nilfs);
- kfree(nilfs->ns_gc_inodes_h);
- nilfs->ns_gc_inodes_h = NULL;
- }
-}
-
-static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino,
- __u64 cno)
-{
- struct inode *inode;
- struct nilfs_inode_info *ii;
-
- 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;
-
- ii = NILFS_I(inode);
- ii->i_cno = cno;
- ii->i_flags = 0;
- ii->i_state = 1 << NILFS_I_GCINODE;
- ii->i_bh = NULL;
- nilfs_bmap_init_gc(ii->i_bmap);
+ struct nilfs_inode_info *ii = NILFS_I(inode);
+ struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs;
+ int ret;