File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,31 @@ struct mbt_ext4_super_block {
30
30
#define MBT_CTX (_sb ) (&MBT_SB(_sb)->mbt_ctx)
31
31
#define MBT_GRP_CTX (_sb , _group ) (&MBT_CTX(_sb)->grp_ctx[_group])
32
32
33
+ static struct inode * mbt_alloc_inode (struct super_block * sb )
34
+ {
35
+ struct ext4_inode_info * ei ;
36
+
37
+ ei = kmalloc (sizeof (struct ext4_inode_info ), GFP_KERNEL );
38
+ if (!ei )
39
+ return NULL ;
40
+
41
+ INIT_LIST_HEAD (& ei -> i_orphan );
42
+ init_rwsem (& ei -> xattr_sem );
43
+ init_rwsem (& ei -> i_data_sem );
44
+ inode_init_once (& ei -> vfs_inode );
45
+ ext4_fc_init_inode (& ei -> vfs_inode );
46
+
47
+ return & ei -> vfs_inode ;
48
+ }
49
+
50
+ static void mbt_free_inode (struct inode * inode )
51
+ {
52
+ kfree (EXT4_I (inode ));
53
+ }
54
+
33
55
static const struct super_operations mbt_sops = {
56
+ .alloc_inode = mbt_alloc_inode ,
57
+ .free_inode = mbt_free_inode ,
34
58
};
35
59
36
60
static void mbt_kill_sb (struct super_block * sb )
You can’t perform that action at this time.
0 commit comments