diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-05 19:16:20 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:47:59 -0400 |
commit | d299eadc098743ea0cfbf9502fb04abf1d39ce36 (patch) | |
tree | eff6bbef2b0a94092fd83e746014e9c1058bf4a6 | |
parent | 1f895f75dc0881592ef21488aac36cfb2b6ca1e3 (diff) |
switch sysv to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/sysv/ialloc.c | 1 | ||||
-rw-r--r-- | fs/sysv/inode.c | 15 |
2 files changed, 10 insertions, 6 deletions
diff --git a/fs/sysv/ialloc.c b/fs/sysv/ialloc.c index fcc498ec9b33..0c96c98bd1db 100644 --- a/fs/sysv/ialloc.c +++ b/fs/sysv/ialloc.c | |||
@@ -113,7 +113,6 @@ void sysv_free_inode(struct inode * inode) | |||
113 | return; | 113 | return; |
114 | } | 114 | } |
115 | raw_inode = sysv_raw_inode(sb, ino, &bh); | 115 | raw_inode = sysv_raw_inode(sb, ino, &bh); |
116 | clear_inode(inode); | ||
117 | if (!raw_inode) { | 116 | if (!raw_inode) { |
118 | printk("sysv_free_inode: unable to read inode block on device " | 117 | printk("sysv_free_inode: unable to read inode block on device " |
119 | "%s\n", inode->i_sb->s_id); | 118 | "%s\n", inode->i_sb->s_id); |
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) | |||
308 | return __sysv_write_inode(inode, 1); | 308 | return __sysv_write_inode(inode, 1); |
309 | } | 309 | } |
310 | 310 | ||
311 | static void sysv_delete_inode(struct inode *inode) | 311 | static void sysv_evict_inode(struct inode *inode) |
312 | { | 312 | { |
313 | truncate_inode_pages(&inode->i_data, 0); | 313 | truncate_inode_pages(&inode->i_data, 0); |
314 | inode->i_size = 0; | 314 | if (!inode->i_nlink) { |
315 | sysv_truncate(inode); | 315 | inode->i_size = 0; |
316 | sysv_free_inode(inode); | 316 | sysv_truncate(inode); |
317 | } | ||
318 | invalidate_inode_buffers(inode); | ||
319 | end_writeback(inode); | ||
320 | if (!inode->i_nlink) | ||
321 | sysv_free_inode(inode); | ||
317 | } | 322 | } |
318 | 323 | ||
319 | static struct kmem_cache *sysv_inode_cachep; | 324 | static struct kmem_cache *sysv_inode_cachep; |
@@ -344,7 +349,7 @@ const struct super_operations sysv_sops = { | |||
344 | .alloc_inode = sysv_alloc_inode, | 349 | .alloc_inode = sysv_alloc_inode, |
345 | .destroy_inode = sysv_destroy_inode, | 350 | .destroy_inode = sysv_destroy_inode, |
346 | .write_inode = sysv_write_inode, | 351 | .write_inode = sysv_write_inode, |
347 | .delete_inode = sysv_delete_inode, | 352 | .evict_inode = sysv_evict_inode, |
348 | .put_super = sysv_put_super, | 353 | .put_super = sysv_put_super, |
349 | .write_super = sysv_write_super, | 354 | .write_super = sysv_write_super, |
350 | .sync_fs = sysv_sync_fs, | 355 | .sync_fs = sysv_sync_fs, |