[PATCH 0/2] ipc/util.c: Cleanup and improve sysvipc_find_ipc(), V2

From: Manfred Spraul
Date: Fri Sep 03 2021 - 01:20:50 EST


Update of the sysvipc_find_ipc() changes:

patch 01:
Unmodified patch from Rafael Aquini, already in mmotm.
https://www.ozlabs.org/~akpm/mmotm/broken-out/ipc-replace-costly-bailout-check-in-sysvipc_find_ipc.patch

Acked-by: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx>
https://lore.kernel.org/lkml/42b60dd8-8393-5e0f-e576-da5303f29fe7@xxxxxxxxxxxxxxxx/T/#m230673c8ef7261745e80ba458b9712bf1fad2251

patch 02:
Performance improvement and further cleanup.

Especially, patch 02 tries to make sysvipc_find_ipc() more readable.

E.g.: There was a "+1" at the end of the function.
My first idea: "+1", as in "move to next".
No, the "+1" was "convert from index to pos".

@Andrew: Patch 01 is already in mmotm. Could you add
patch 02 to your tree and forward it as needed?

Thanks,
Manfred