• Frank Cusack's avatar
    [PATCH] nfs_unlink() problem fix · 32538906
    Frank Cusack authored
    When foo is unlinked, nfs_unlink() does a sillyrename, this puts the
    dentry on nfs_delete_queue, and (in the VFS) unhashes it from the
    dcache.  This causes problems, since any later access to the
    silly-renamed new .nfs file will create a NEW dentry that aliases the
    one we originally created, but unhashed.
    
    This causes various confusion, especially if we want to try to delete it
    again later.
    
    So fix this by not unhash the dentry after silly-renaming.  In 2.2, each
    fs was responsible for doing a d_delete(), in 2.4 and later it happens
    in the VFS layer and I think it was just an oversight that the 2.4 VFS
    doesn't consider sillyrename (considering the code and comments that are
    cruft).
    
    Also fixed up some comments while debugging this.
    32538906
namei.c 53.5 KB