aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/gcinode.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-08-21 09:01:51 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-10-22 20:24:34 -0400
commit5e19a995f4ad8a8f20749a396bb01ebb6d4df96c (patch)
treea6012a5f553a29d02101c81595a368c4eb90b101 /fs/nilfs2/gcinode.c
parent0e14a3595bddedfb27b51a6b0a29b5173aa2511a (diff)
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>
Diffstat (limited to 'fs/nilfs2/gcinode.c')
-rw-r--r--fs/nilfs2/gcinode.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c
index bed3a783129b..cd19a3709bda 100644
--- a/fs/nilfs2/gcinode.c
+++ b/fs/nilfs2/gcinode.c
@@ -225,10 +225,14 @@ static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino,
225 struct inode *inode; 225 struct inode *inode;
226 struct nilfs_inode_info *ii; 226 struct nilfs_inode_info *ii;
227 227
228 inode = nilfs_mdt_new_common(nilfs, NULL, ino, GFP_NOFS, 0); 228 inode = nilfs_mdt_new_common(nilfs, NULL, ino);
229 if (!inode) 229 if (!inode)
230 return NULL; 230 return NULL;
231 231
232 if (nilfs_mdt_init(inode, nilfs, GFP_NOFS, 0) < 0) {
233 nilfs_destroy_inode(inode);
234 return NULL;
235 }
232 inode->i_op = NULL; 236 inode->i_op = NULL;
233 inode->i_fop = NULL; 237 inode->i_fop = NULL;
234 inode->i_mapping->a_ops = &def_gcinode_aops; 238 inode->i_mapping->a_ops = &def_gcinode_aops;