On Wed, Feb 26, 2020 at 8:37 AM Steve French <smfrench@xxxxxxxxx> wrote: > What sort of rename races? Is that a real/reproducible problem? > Should be safer to do the dentry move immediately after the rename > rather than later. > Looking at what "later" means, you moved d_move() before cifs_put_tlink(tlink); and shrink_dcache_parent(new_dentry); detach_mounts(new_dentry); I suppose cifs_put_tlink() is not the issue. It makes me wonder about shrink_dcache_parent()/detach_mounts() - they happen for some fs before d_move() and for some fs after d_move() I think it kind of makes sense to have them moved after dentry is unhashed anyway? (that is after d_move()). Thanks, Amir.