aboutsummaryrefslogtreecommitdiffstats
path: root/fs/affs/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-06 10:16:41 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:48:06 -0400
commitf053ddde7575090e09e2f5c4233d8a19f0925b93 (patch)
treeb1eaf704f30a44f25a4e319df14b78f3c8cb2008 /fs/affs/inode.c
parent69c9e750176b409559b2361fbb28fa7bbf3c5461 (diff)
switch affs to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/affs/inode.c')
-rw-r--r--fs/affs/inode.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 6883d5fb84cf..3a0fdec175ba 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -252,23 +252,19 @@ out:
252} 252}
253 253
254void 254void
255affs_delete_inode(struct inode *inode) 255affs_evict_inode(struct inode *inode)
256{
257 pr_debug("AFFS: delete_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink);
258 truncate_inode_pages(&inode->i_data, 0);
259 inode->i_size = 0;
260 affs_truncate(inode);
261 clear_inode(inode);
262 affs_free_block(inode->i_sb, inode->i_ino);
263}
264
265void
266affs_clear_inode(struct inode *inode)
267{ 256{
268 unsigned long cache_page; 257 unsigned long cache_page;
258 pr_debug("AFFS: evict_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink);
259 truncate_inode_pages(&inode->i_data, 0);
269 260
270 pr_debug("AFFS: clear_inode(ino=%lu, nlink=%u)\n", inode->i_ino, inode->i_nlink); 261 if (!inode->i_nlink) {
262 inode->i_size = 0;
263 affs_truncate(inode);
264 }
271 265
266 invalidate_inode_buffers(inode);
267 end_writeback(inode);
272 affs_free_prealloc(inode); 268 affs_free_prealloc(inode);
273 cache_page = (unsigned long)AFFS_I(inode)->i_lc; 269 cache_page = (unsigned long)AFFS_I(inode)->i_lc;
274 if (cache_page) { 270 if (cache_page) {
@@ -280,6 +276,9 @@ affs_clear_inode(struct inode *inode)
280 affs_brelse(AFFS_I(inode)->i_ext_bh); 276 affs_brelse(AFFS_I(inode)->i_ext_bh);
281 AFFS_I(inode)->i_ext_last = ~1; 277 AFFS_I(inode)->i_ext_last = ~1;
282 AFFS_I(inode)->i_ext_bh = NULL; 278 AFFS_I(inode)->i_ext_bh = NULL;
279
280 if (!inode->i_nlink)
281 affs_free_block(inode->i_sb, inode->i_ino);
283} 282}
284 283
285struct inode * 284struct inode *