Skip to content

Commit 69c9e75

Browse files
author
Al Viro
committed
switch omfs to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 9df2f85 commit 69c9e75

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎fs/omfs/inode.c‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,20 @@ int omfs_sync_inode(struct inode *inode)
175175
* called when an entry is deleted, need to clear the bits in the
176176
* bitmaps.
177177
*/
178-
static void omfs_delete_inode(struct inode *inode)
178+
static void omfs_evict_inode(struct inode *inode)
179179
{
180180
truncate_inode_pages(&inode->i_data, 0);
181+
end_writeback(inode);
182+
183+
if (inode->i_nlink)
184+
return;
181185

182186
if (S_ISREG(inode->i_mode)) {
183187
inode->i_size = 0;
184188
omfs_shrink_inode(inode);
185189
}
186190

187191
omfs_clear_range(inode->i_sb, inode->i_ino, 2);
188-
clear_inode(inode);
189192
}
190193

191194
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)
284287

285288
static const struct super_operations omfs_sops = {
286289
.write_inode = omfs_write_inode,
287-
.delete_inode = omfs_delete_inode,
290+
.evict_inode = omfs_evict_inode,
288291
.put_super = omfs_put_super,
289292
.statfs = omfs_statfs,
290293
.show_options = generic_show_options,

0 commit comments

Comments
 (0)