summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-08-01 16:54:26 -0500
committerDave Kleikamp <shaggy@austin.ibm.com>2005-08-01 16:54:26 -0500
commit30db1ae8640d3527ca7ac8df4bcbf14ccc6ae9cd (patch)
treef42fc0f8fc07dcd0c2cc15aa31566a321a8f2a30
parentda28c12089dfcfb8695b6b555cdb8e03dda2b690 (diff)
downloadblackbird-op-linux-30db1ae8640d3527ca7ac8df4bcbf14ccc6ae9cd.tar.gz
blackbird-op-linux-30db1ae8640d3527ca7ac8df4bcbf14ccc6ae9cd.zip
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>
-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)
{
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 (test_cflag(COMMIT_Freewmap, inode))
jfs_free_zero_link(inode);
OpenPOWER on IntegriCloud