From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: [PATCH] remove bad inodes from hash table Date: Tue, 3 Dec 2002 20:53:25 -0500 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20021203205325.A1065@sgi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org Return-path: To: torvalds@transmeta.com, viro@math.psu.edu Content-Disposition: inline List-Id: linux-fsdevel.vger.kernel.org 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. --- 1.7/fs/bad_inode.c Tue Sep 17 21:52:27 2002 +++ edited/fs/bad_inode.c Tue Dec 3 19:20:54 2002 @@ -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;