summaryrefslogtreecommitdiffstats
path: root/fs/sysv/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-05 19:16:20 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:47:59 -0400
commitd299eadc098743ea0cfbf9502fb04abf1d39ce36 (patch)
treeeff6bbef2b0a94092fd83e746014e9c1058bf4a6 /fs/sysv/inode.c
parent1f895f75dc0881592ef21488aac36cfb2b6ca1e3 (diff)
downloadlinux-d299eadc098743ea0cfbf9502fb04abf1d39ce36.tar.bz2
switch sysv to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sysv/inode.c')
-rw-r--r--fs/sysv/inode.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index d4a5380b5669..613a5056e880 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -308,12 +308,17 @@ int sysv_sync_inode(struct inode *inode)
return __sysv_write_inode(inode, 1);
}
-static void sysv_delete_inode(struct inode *inode)
+static void sysv_evict_inode(struct inode *inode)
{
truncate_inode_pages(&inode->i_data, 0);
- inode->i_size = 0;
- sysv_truncate(inode);
- sysv_free_inode(inode);
+ if (!inode->i_nlink) {
+ inode->i_size = 0;
+ sysv_truncate(inode);
+ }
+ invalidate_inode_buffers(inode);
+ end_writeback(inode);
+ if (!inode->i_nlink)
+ sysv_free_inode(inode);
}
static struct kmem_cache *sysv_inode_cachep;
@@ -344,7 +349,7 @@ const struct super_operations sysv_sops = {
.alloc_inode = sysv_alloc_inode,
.destroy_inode = sysv_destroy_inode,
.write_inode = sysv_write_inode,
- .delete_inode = sysv_delete_inode,
+ .evict_inode = sysv_evict_inode,
.put_super = sysv_put_super,
.write_super = sysv_write_super,
.sync_fs = sysv_sync_fs,