Re: [PATCH] XArray: minor documentation improvements

From: Tamir Duberstein
Date: Wed Oct 09 2024 - 16:52:09 EST


On Wed, Oct 9, 2024 at 4:44 PM Darrick J. Wong <djwong@xxxxxxxxxx> wrote:
>
> n00b question: is xa_store(..., NULL) the same as xa_erase?
>
> If it is, then should the documentation mention that xa_store(NULL) is
> the same as xa_erase, and that both of these operations will cause the
> xarray to forget about that range?

They're not quite the same in the presence of `XA_FLAGS_ALLOC`. Per the docs:

> Unlike a normal XArray, storing NULL will mark the entry as being in use [...]

See https://docs.kernel.org/core-api/xarray.html#allocating-xarrays.