Re: [PATCH bpf-next v2 1/3] libfs: support RENAME_EXCHANGE in simple_rename()

From: Lorenz Bauer
Date: Thu Oct 28 2021 - 05:49:44 EST


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