aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/ops_super.c')
-rw-r--r--fs/gfs2/ops_super.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index 6fa7b8649f14..1c17acc946f9 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -361,7 +361,31 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
361 return 0; 361 return 0;
362} 362}
363 363
364static struct inode *gfs2_alloc_inode(struct super_block *sb)
365{
366 struct gfs2_sbd *sdp = sb->s_fs_info;
367 struct gfs2_inode *ip;
368
369 ip = kmem_cache_alloc(gfs2_inode_cachep, GFP_KERNEL);
370 if (ip) {
371 ip->i_flags = 0;
372 ip->i_gl = NULL;
373 ip->i_sbd = sdp;
374 ip->i_vnode = &ip->i_inode;
375 ip->i_greedy = gfs2_tune_get(sdp, gt_greedy_default);
376 ip->i_last_pfault = jiffies;
377 }
378 return &ip->i_inode;
379}
380
381static void gfs2_destroy_inode(struct inode *inode)
382{
383 kmem_cache_free(gfs2_inode_cachep, inode);
384}
385
364struct super_operations gfs2_super_ops = { 386struct super_operations gfs2_super_ops = {
387 .alloc_inode = gfs2_alloc_inode,
388 .destroy_inode = gfs2_destroy_inode,
365 .write_inode = gfs2_write_inode, 389 .write_inode = gfs2_write_inode,
366 .put_super = gfs2_put_super, 390 .put_super = gfs2_put_super,
367 .write_super = gfs2_write_super, 391 .write_super = gfs2_write_super,