Re: attempt to re-implement sillyrename for NFS in 2.1.*

Bill Hawes (whawes@star.net)
Fri, 22 Aug 1997 13:16:48 -0400


Linus Torvalds wrote:
> The problem is that "sillyrename_cleanup" has nothing to do with the
> inode. It depends _only_ on the 'dentry'. The inode may be around
> (indefinitely) with a non-zero count for hardlinks etc..
>
> This is why I haven't applied Claus-Justus' patches: they tried to handle
> this, but I don't like the way it was done. I think we should just add a
> "delete" (or "forget") function to the "dentry_operations" structure
> block, and call that from dput() when we put the last copy of the dentry.
>
> Then the NFS code would delete the silly rename where it is appropriate,
> without any hacks (no need to remove the dentry from the hash chains etc
> like Claus did).

I thought silly rename was generally used only to support temp files
with nlink = 1.

If the sillyrename is handled at the dentry level, doesn't that also
imply that the state associated with the rename will also need to be
stored at the dentry? If the inode has nlink > 1, it might undergo
silly renames in other directories where it appears, and need separate
state for those.

Regards,
Bill