Re: inodes are not cleared!

Bill Hawes (whawes@star.net)
Wed, 22 Jul 1998 13:23:54 -0400


kuznet@ms2.inr.ac.ru wrote:

> Answer: right, /var/run/wtmp is append-only and networking
> reused its stale inode. Taking into account that this box does almost
> nothing but networkig, the cancer finally results in complete
> networking collapse.
>
> This problem is cured by fixing get_empty_inode():
>
> inode->i_count = 1;
> inode->i_state = 0;
> + inode->i_flags = 0;
> spin_unlock(&inode_lock);
> clean_inode(inode);
>
> but I am not sure, that it is final answer. This code is enough messy
> to believe that it does not forget to clear something more.

Hi Alexey,

The general inode code does only a minimal clearing of fields for
performance reasons. Most filesystems want to set the i_flags value
themselves, or else don't use it at all.

Assuming that the inode in question was for a socket, I would suggest
clearing i_flags in the socket code instead.

Regards,
Bill

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html