diff options
Diffstat (limited to 'fs/pstore/inode.c')
-rw-r--r-- | fs/pstore/inode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index 08342232cb1c..f777f2902c49 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c | |||
@@ -73,11 +73,16 @@ static int pstore_unlink(struct inode *dir, struct dentry *dentry) | |||
73 | struct pstore_private *p = dentry->d_inode->i_private; | 73 | struct pstore_private *p = dentry->d_inode->i_private; |
74 | 74 | ||
75 | p->erase(p->id); | 75 | p->erase(p->id); |
76 | kfree(p); | ||
77 | 76 | ||
78 | return simple_unlink(dir, dentry); | 77 | return simple_unlink(dir, dentry); |
79 | } | 78 | } |
80 | 79 | ||
80 | static void pstore_evict_inode(struct inode *inode) | ||
81 | { | ||
82 | end_writeback(inode); | ||
83 | kfree(inode->i_private); | ||
84 | } | ||
85 | |||
81 | static const struct inode_operations pstore_dir_inode_operations = { | 86 | static const struct inode_operations pstore_dir_inode_operations = { |
82 | .lookup = simple_lookup, | 87 | .lookup = simple_lookup, |
83 | .unlink = pstore_unlink, | 88 | .unlink = pstore_unlink, |
@@ -110,6 +115,7 @@ static struct inode *pstore_get_inode(struct super_block *sb, | |||
110 | static const struct super_operations pstore_ops = { | 115 | static const struct super_operations pstore_ops = { |
111 | .statfs = simple_statfs, | 116 | .statfs = simple_statfs, |
112 | .drop_inode = generic_delete_inode, | 117 | .drop_inode = generic_delete_inode, |
118 | .evict_inode = pstore_evict_inode, | ||
113 | .show_options = generic_show_options, | 119 | .show_options = generic_show_options, |
114 | }; | 120 | }; |
115 | 121 | ||