Skip to contentSkip to conversation

remove bad inodes from hash table

PATCH New Christoph Hellwig 1 participant 1 message Dec 4, 2002 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove bad inodes from hash table

When testing the XFS 1.2 release we found a problem that was caused by inodes made unusable by make_bad_inode() still beeing returned by iget() and friends. The workaround was to call remove_inode_hash() before each call to make_bad_inode().

I think the proper fix is to let make_bad_inode() remove the inodes from the hash chains.

fs/bad_inode.c +2 -0
@@ -84,6 +84,8 @@
  
 void make_bad_inode(struct inode * inode) 
 {
+	remove_inode_hash(inode);
+
 	inode->i_mode = S_IFREG;
 	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
 	inode->i_op = &bad_inode_ops;