]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
switch jfs to ->evict_inode()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Jun 2010 04:28:54 +0000 (00:28 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Aug 2010 20:48:17 +0000 (16:48 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/jfs/inode.c
fs/jfs/jfs_inode.h
fs/jfs/super.c

index c38dc1806281ec8746142fa36a2ed9871f08b2cf..9978803ceedc519ea90a84bbe04f7a77b8bc5b4e 100644 (file)
@@ -145,31 +145,32 @@ int jfs_write_inode(struct inode *inode, struct writeback_control *wbc)
                return 0;
 }
 
-void jfs_delete_inode(struct inode *inode)
+void jfs_evict_inode(struct inode *inode)
 {
-       jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
+       jfs_info("In jfs_evict_inode, inode = 0x%p", inode);
 
-       if (!is_bad_inode(inode))
+       if (!inode->i_nlink && !is_bad_inode(inode)) {
                dquot_initialize(inode);
 
-       if (!is_bad_inode(inode) &&
-           (JFS_IP(inode)->fileset == FILESYSTEM_I)) {
-               truncate_inode_pages(&inode->i_data, 0);
+               if (JFS_IP(inode)->fileset == FILESYSTEM_I) {
+                       truncate_inode_pages(&inode->i_data, 0);
 
-               if (test_cflag(COMMIT_Freewmap, inode))
-                       jfs_free_zero_link(inode);
+                       if (test_cflag(COMMIT_Freewmap, inode))
+                               jfs_free_zero_link(inode);
 
-               diFree(inode);
+                       diFree(inode);
 
-               /*
-                * Free the inode from the quota allocation.
-                */
-               dquot_initialize(inode);
-               dquot_free_inode(inode);
-               dquot_drop(inode);
+                       /*
+                        * Free the inode from the quota allocation.
+                        */
+                       dquot_initialize(inode);
+                       dquot_free_inode(inode);
+               }
+       } else {
+               truncate_inode_pages(&inode->i_data, 0);
        }
-
-       clear_inode(inode);
+       end_writeback(inode);
+       dquot_drop(inode);
 }
 
 void jfs_dirty_inode(struct inode *inode)
index 11042b1f44b5fbd0e60f856e01595144d53213aa..155e91eff07d6efa31adcea1ea69278f71e18478 100644 (file)
@@ -27,7 +27,7 @@ extern long jfs_compat_ioctl(struct file *, unsigned int, unsigned long);
 extern struct inode *jfs_iget(struct super_block *, unsigned long);
 extern int jfs_commit_inode(struct inode *, int);
 extern int jfs_write_inode(struct inode *, struct writeback_control *);
-extern void jfs_delete_inode(struct inode *);
+extern void jfs_evict_inode(struct inode *);
 extern void jfs_dirty_inode(struct inode *);
 extern void jfs_truncate(struct inode *);
 extern void jfs_truncate_nolock(struct inode *, loff_t);
index b38f96bef8292ffe040eaa8b55b8f156bcad3702..ec8c3e4baca3f78d666c33982d7040afcf73628b 100644 (file)
@@ -132,11 +132,6 @@ static void jfs_destroy_inode(struct inode *inode)
        kmem_cache_free(jfs_inode_cachep, ji);
 }
 
-static void jfs_clear_inode(struct inode *inode)
-{
-       dquot_drop(inode);
-}
-
 static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
        struct jfs_sb_info *sbi = JFS_SBI(dentry->d_sb);
@@ -765,8 +760,7 @@ static const struct super_operations jfs_super_operations = {
        .destroy_inode  = jfs_destroy_inode,
        .dirty_inode    = jfs_dirty_inode,
        .write_inode    = jfs_write_inode,
-       .delete_inode   = jfs_delete_inode,
-       .clear_inode    = jfs_clear_inode,
+       .evict_inode    = jfs_evict_inode,
        .put_super      = jfs_put_super,
        .sync_fs        = jfs_sync_fs,
        .freeze_fs      = jfs_freeze,