Re: New pre-patch..

Linus Torvalds (
Sat, 12 Jul 1997 17:22:27 -0700 (PDT)

On Sat, 12 Jul 1997, Linus Torvalds wrote:
> Ok, I made yet another pre-patch, and this time it actually does roughly
> what it should do.

Never mind, as David already claimed I'm batting a 1,000 today. The
pre-patch actually mostly works, but the try_to_free function tries to
free the _first_ entry on the LRU list rather than the last one, and
obviously the first entry is almost always likely to not be freeable at
all (because we put anything that has its inode in use at the beginning of
the list).

So not only does it almost never free anything, but because of that it
tends to never do an "iput()", so your filesystem fills up with undead
files when you delete them.

Simple fix: change the "" to a "dentry_unused.prev" in
try_free_dentries(). That should at least make it work the way I
_intended_ it should work. Whether that makes it any more usable I don't