Re: [PATCH v2 1/2] pid: Replace pid bitmap implementation with IDR API

From: Christoph Hellwig
Date: Sun Oct 01 2017 - 05:15:41 EST


> - task_active_pid_ns(current)->last_pid);
> + task_active_pid_ns(current)->idr.idr_next-1);

I think we want a well documented helper for this pattern instead
of poking into the internals.

Also is last - 1 always the correct answer? Even with idr_alloc_cyclic
we could wrap around, couldn't we?