summaryrefslogtreecommitdiffstats
path: root/fs/jfs/inode.c
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 /fs/jfs/inode.c
parentda28c12089dfcfb8695b6b555cdb8e03dda2b690 (diff)
downloadop-kernel-dev-30db1ae8640d3527ca7ac8df4bcbf14ccc6ae9cd.zip
op-kernel-dev-30db1ae8640d3527ca7ac8df4bcbf14ccc6ae9cd.tar.gz
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/inode.c')
-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 2137138..767c7ec 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