Re: pre-patch2.1.45-3 lookin' good

Linus Torvalds (
Sun, 13 Jul 1997 11:48:11 -0700 (PDT)

On Sun, 13 Jul 1997, Bill Hawes wrote:
> As far as I can tell, the attached patch against pre-patch2.1.45-3 fixes
> the memory leak, mounts and umounts cleanly, and fixes all the bugs I've
> been able to find. I have a new approach to the clear_inode race
> problems -- iput() sets a flag to indicate the inode is closing, and
> find_inode makes anyone accessing that inode wait for the closing to
> complete. clear_inode() just sets a flag saying "clear me", and iput()
> does the dirty work.

I'm taking a different approach - get rid of using inodes for anything but
low-level fs operations, and use "dentry" everywhere else. That was a
long-range plan that got upgraded to short-term because it is also going
to make dentry management much simpler.

Most of the current problems stem from the fact that right now the dentry
memory cannot always be free'd if d_count is zero - because the inode may
be in use. My current setup gets rid of that (and i_count is now only a
counter of how many dentries count to it - hard links).

Your patch looks sane, but becomes mostly irrelevant in my tree. Of
course, my current tree doesn't really compile yet ;)