Skip to content
  • Trond Myklebust's avatar
    NFS: Fix a race in sillyrename · 565277f6
    Trond Myklebust authored
    lookup() and sillyrename() can race one another because the sillyrename()
    completion cannot take the parent directory's inode->i_mutex since the
    latter may be held by whoever is calling dput().
    
    We therefore have little option but to add extra locking to ensure that
    nfs_lookup() and nfs_atomic_open() do not race with the sillyrename
    completion.
    If somebody has looked up the sillyrenamed file in the meantime, we just
    transfer the sillydelete information to the new dentry.
    
    Please refer to the bug-report at
    	http://bugzilla.linux-nfs.org/show_bug.cgi?id=150
    
    
    
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    565277f6