Skip to content

Commit d299ead

Browse files
author
Al Viro
committed
switch sysv to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 1f895f7 commit d299ead

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

fs/sysv/ialloc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ void sysv_free_inode(struct inode * inode)
113113
return;
114114
}
115115
raw_inode = sysv_raw_inode(sb, ino, &bh);
116-
clear_inode(inode);
117116
if (!raw_inode) {
118117
printk("sysv_free_inode: unable to read inode block on device "
119118
"%s\n", inode->i_sb->s_id);

fs/sysv/inode.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,17 @@ int sysv_sync_inode(struct inode *inode)
308308
return __sysv_write_inode(inode, 1);
309309
}
310310

311-
static void sysv_delete_inode(struct inode *inode)
311+
static void sysv_evict_inode(struct inode *inode)
312312
{
313313
truncate_inode_pages(&inode->i_data, 0);
314-
inode->i_size = 0;
315-
sysv_truncate(inode);
316-
sysv_free_inode(inode);
314+
if (!inode->i_nlink) {
315+
inode->i_size = 0;
316+
sysv_truncate(inode);
317+
}
318+
invalidate_inode_buffers(inode);
319+
end_writeback(inode);
320+
if (!inode->i_nlink)
321+
sysv_free_inode(inode);
317322
}
318323

319324
static struct kmem_cache *sysv_inode_cachep;
@@ -344,7 +349,7 @@ const struct super_operations sysv_sops = {
344349
.alloc_inode = sysv_alloc_inode,
345350
.destroy_inode = sysv_destroy_inode,
346351
.write_inode = sysv_write_inode,
347-
.delete_inode = sysv_delete_inode,
352+
.evict_inode = sysv_evict_inode,
348353
.put_super = sysv_put_super,
349354
.write_super = sysv_write_super,
350355
.sync_fs = sysv_sync_fs,

0 commit comments

Comments
 (0)