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 ;)
Linus