On Thu, 28 Oct 2021 at 09:43, Miklos Szeredi <mszeredi@xxxxxxxxxx> wrote: > > This is not sufficient. RENAME_EXCHANGE can swap a dir and a > non-dir, in which case the parent nlink counters need to be fixed up. > > See shmem_exchange(). My suggestion is to move that function to > libfs.c:simple_rename_exchange(). Thanks for the pointer, I sent a v3. Lorenz -- Lorenz Bauer | Systems Engineer 6th Floor, County Hall/The Riverside Building, SE1 7PB, UK www.cloudflare.com