SCCS-vsn: sys/ufs/ffs/ffs_inode.c 7.31
SCCS-vsn: sys/ufs/ffs/ufs_inode.c 7.31
SCCS-vsn: sys/ufs/lfs/lfs_inode.c 7.31
SCCS-vsn: sys/ufs/ufs/ufs_inode.c 7.31
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ffs_inode.c 7.30 (Berkeley) %G%
+ * @(#)ffs_inode.c 7.31 (Berkeley) %G%
*/
if (error = bread(VFSTOUFS(mntp)->um_devvp, fsbtodb(fs, itod(fs, ino)),
(int)fs->fs_bsize, NOCRED, &bp)) {
*/
if (error = bread(VFSTOUFS(mntp)->um_devvp, fsbtodb(fs, itod(fs, ino)),
(int)fs->fs_bsize, NOCRED, &bp)) {
+ /*
+ * The inode does not contain anything useful, so it would
+ * be misleading to leave it on its hash chain.
+ * Iput() will take care of putting it back on the free list.
+ */
+ remque(ip);
+ ip->i_forw = ip;
+ ip->i_back = ip;
/*
* Unlock and discard unneeded inode.
*/
/*
* Unlock and discard unneeded inode.
*/
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ufs_inode.c 7.30 (Berkeley) %G%
+ * @(#)ufs_inode.c 7.31 (Berkeley) %G%
*/
if (error = bread(VFSTOUFS(mntp)->um_devvp, fsbtodb(fs, itod(fs, ino)),
(int)fs->fs_bsize, NOCRED, &bp)) {
*/
if (error = bread(VFSTOUFS(mntp)->um_devvp, fsbtodb(fs, itod(fs, ino)),
(int)fs->fs_bsize, NOCRED, &bp)) {
+ /*
+ * The inode does not contain anything useful, so it would
+ * be misleading to leave it on its hash chain.
+ * Iput() will take care of putting it back on the free list.
+ */
+ remque(ip);
+ ip->i_forw = ip;
+ ip->i_back = ip;
/*
* Unlock and discard unneeded inode.
*/
/*
* Unlock and discard unneeded inode.
*/
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)lfs_inode.c 7.30 (Berkeley) %G%
+ * @(#)lfs_inode.c 7.31 (Berkeley) %G%
*/
if (error = bread(VFSTOUFS(mntp)->um_devvp, fsbtodb(fs, itod(fs, ino)),
(int)fs->fs_bsize, NOCRED, &bp)) {
*/
if (error = bread(VFSTOUFS(mntp)->um_devvp, fsbtodb(fs, itod(fs, ino)),
(int)fs->fs_bsize, NOCRED, &bp)) {
+ /*
+ * The inode does not contain anything useful, so it would
+ * be misleading to leave it on its hash chain.
+ * Iput() will take care of putting it back on the free list.
+ */
+ remque(ip);
+ ip->i_forw = ip;
+ ip->i_back = ip;
/*
* Unlock and discard unneeded inode.
*/
/*
* Unlock and discard unneeded inode.
*/
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#)ufs_inode.c 7.30 (Berkeley) %G%
+ * @(#)ufs_inode.c 7.31 (Berkeley) %G%
*/
if (error = bread(VFSTOUFS(mntp)->um_devvp, fsbtodb(fs, itod(fs, ino)),
(int)fs->fs_bsize, NOCRED, &bp)) {
*/
if (error = bread(VFSTOUFS(mntp)->um_devvp, fsbtodb(fs, itod(fs, ino)),
(int)fs->fs_bsize, NOCRED, &bp)) {
+ /*
+ * The inode does not contain anything useful, so it would
+ * be misleading to leave it on its hash chain.
+ * Iput() will take care of putting it back on the free list.
+ */
+ remque(ip);
+ ip->i_forw = ip;
+ ip->i_back = ip;
/*
* Unlock and discard unneeded inode.
*/
/*
* Unlock and discard unneeded inode.
*/