Re: [PATCH v2 2/2] pid: only take pidmap_lock once on alloc

From: Oleg Nesterov

Date: Thu Dec 04 2025 - 09:31:36 EST


On 12/03, Mateusz Guzik wrote:
>
> It has an unintentional side effect of no longer issuing spurious
> idr_preload() around idr_replace().
^^^^^^^^^^^

Around pidfs_add_pid(). The extra idr_preload/end was added by commit
9698d5a483654 ("pidfs: rework inode number allocation") because
pidfs_add_pid() used to call idr_alloc_cyclic(GFP_ATOMIC) too.

The patch looks technically correct to me, so FWIW

Reviewed-by: Oleg Nesterov <oleg@xxxxxxxxxx>