aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-08-01 17:54:26 -0400
committerDave Kleikamp <shaggy@austin.ibm.com>2005-08-01 17:54:26 -0400
commit30db1ae8640d3527ca7ac8df4bcbf14ccc6ae9cd (patch)
treef42fc0f8fc07dcd0c2cc15aa31566a321a8f2a30 /fs/jfs
parentda28c12089dfcfb8695b6b555cdb8e03dda2b690 (diff)
JFS: Check for invalid inodes in jfs_delete_inode
Some error paths may iput an invalid inode with i_nlink=0. jfs should not try to actually delete such an inode. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs/jfs')
-rw-r--r--fs/jfs/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index 2137138c59b0..767c7ecb429e 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -128,6 +128,10 @@ void jfs_delete_inode(struct inode *inode)
128{ 128{
129 jfs_info("In jfs_delete_inode, inode = 0x%p", inode); 129 jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
130 130
131 if (is_bad_inode(inode) ||
132 (JFS_IP(inode)->fileset != cpu_to_le32(FILESYSTEM_I)))
133 return;
134
131 if (test_cflag(COMMIT_Freewmap, inode)) 135 if (test_cflag(COMMIT_Freewmap, inode))
132 jfs_free_zero_link(inode); 136 jfs_free_zero_link(inode);
133 137