projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da28c12
)
JFS: Check for invalid inodes in jfs_delete_inode
author
Dave Kleikamp
<shaggy@austin.ibm.com>
Mon, 1 Aug 2005 21:54:26 +0000
(16:54 -0500)
committer
Dave Kleikamp
<shaggy@austin.ibm.com>
Mon, 1 Aug 2005 21:54:26 +0000
(16:54 -0500)
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>
fs/jfs/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/jfs/inode.c
b/fs/jfs/inode.c
index 2137138c59b0a4c08839121f0b89c5a55699a9b0..767c7ecb429ed6f044e1954873c73c1d719eaab8 100644
(file)
--- 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);