diff options
-rw-r--r-- | fs/omfs/inode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index 089839a6cc64..56121debc22b 100644 --- a/fs/omfs/inode.c +++ b/fs/omfs/inode.c | |||
@@ -175,9 +175,13 @@ int omfs_sync_inode(struct inode *inode) | |||
175 | * called when an entry is deleted, need to clear the bits in the | 175 | * called when an entry is deleted, need to clear the bits in the |
176 | * bitmaps. | 176 | * bitmaps. |
177 | */ | 177 | */ |
178 | static void omfs_delete_inode(struct inode *inode) | 178 | static void omfs_evict_inode(struct inode *inode) |
179 | { | 179 | { |
180 | truncate_inode_pages(&inode->i_data, 0); | 180 | truncate_inode_pages(&inode->i_data, 0); |
181 | end_writeback(inode); | ||
182 | |||
183 | if (inode->i_nlink) | ||
184 | return; | ||
181 | 185 | ||
182 | if (S_ISREG(inode->i_mode)) { | 186 | if (S_ISREG(inode->i_mode)) { |
183 | inode->i_size = 0; | 187 | inode->i_size = 0; |
@@ -185,7 +189,6 @@ static void omfs_delete_inode(struct inode *inode) | |||
185 | } | 189 | } |
186 | 190 | ||
187 | omfs_clear_range(inode->i_sb, inode->i_ino, 2); | 191 | omfs_clear_range(inode->i_sb, inode->i_ino, 2); |
188 | clear_inode(inode); | ||
189 | } | 192 | } |
190 | 193 | ||
191 | struct inode *omfs_iget(struct super_block *sb, ino_t ino) | 194 | struct inode *omfs_iget(struct super_block *sb, ino_t ino) |
@@ -284,7 +287,7 @@ static int omfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
284 | 287 | ||
285 | static const struct super_operations omfs_sops = { | 288 | static const struct super_operations omfs_sops = { |
286 | .write_inode = omfs_write_inode, | 289 | .write_inode = omfs_write_inode, |
287 | .delete_inode = omfs_delete_inode, | 290 | .evict_inode = omfs_evict_inode, |
288 | .put_super = omfs_put_super, | 291 | .put_super = omfs_put_super, |
289 | .statfs = omfs_statfs, | 292 | .statfs = omfs_statfs, |
290 | .show_options = generic_show_options, | 293 | .show_options = generic_show_options, |