]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] jfs: jfs_delete_inode must call clear_inode
authorDave Kleikamp <shaggy@austin.ibm.com>
Tue, 13 Sep 2005 08:16:09 +0000 (04:16 -0400)
committerChris Wright <chrisw@osdl.org>
Sat, 17 Sep 2005 01:01:58 +0000 (18:01 -0700)
JFS: jfs_delete_inode should always call clear_inode.

> From Chuck Ebbert:
I'm submitting this patch for -stable:

  - it reportedly fixes an oops
  - it's already in 2.6.13-git

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Signed-off-by: Chris Wright <chrisw@osdl.org>
fs/jfs/inode.c

index 767c7ecb429ed6f044e1954873c73c1d719eaab8..37da3e33e7506a0b4be77135b35105b988b9f227 100644 (file)
@@ -128,21 +128,21 @@ void jfs_delete_inode(struct inode *inode)
 {
        jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
 
-       if (is_bad_inode(inode) ||
-           (JFS_IP(inode)->fileset != cpu_to_le32(FILESYSTEM_I)))
-                       return;
+       if (!is_bad_inode(inode) &&
+           (JFS_IP(inode)->fileset == cpu_to_le32(FILESYSTEM_I))) {
 
-       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_INIT(inode);
-       DQUOT_FREE_INODE(inode);
-       DQUOT_DROP(inode);
+               /*
+                * Free the inode from the quota allocation.
+                */
+               DQUOT_INIT(inode);
+               DQUOT_FREE_INODE(inode);
+               DQUOT_DROP(inode);
+       }
 
        clear_inode(inode);
 }