linux/ipc
Manfred Spraul 58b5c20336 ipc/util.c: cleanup and improve sysvipc_find_ipc()
sysvipc_find_ipc() can be simplified further:

- It uses a for() loop to locate the next entry in the idr.
  This can be replaced with idr_get_next().

- It receives two parameters (pos - which is actually
  an idr index and not a position, and new_pos, which
  is really a position).
  One parameter is sufficient.

Link: https://lore.kernel.org/all/20210903052020.3265-3-manfred@colorfullife.com/
Link: https://lkml.kernel.org/r/20220805115733.104763-1-manfred@colorfullife.com
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Acked-by: Waiman Long <longman@redhat.com>
Cc: "Eric W . Biederman" <ebiederm@xmission.com>
Cc: <1vier1@web.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-09-11 21:55:05 -07:00
..
compat.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ipc_sysctl.c ipc: Remove extra braces 2022-05-03 17:25:58 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mq_sysctl.c ipc: Store mqueue sysctls in the ipc namespace 2022-03-08 13:39:40 -06:00
mqueue.c ipc/mqueue: remove unnecessary (void*) conversion 2022-07-17 17:31:40 -07:00
msg.c memcg: enable accounting of ipc resources 2021-09-03 09:58:12 -07:00
msgutil.c ipc: Use generic ns_common::count 2020-08-19 14:13:52 +02:00
namespace.c ipc: Free mq_sysctls if ipc namespace creation failed 2022-06-22 17:47:41 -05:00
sem.c ipc: update semtimedop() to use hrtimer 2022-05-09 18:29:20 -07:00
shm.c shm: extend forced shm destroy to support objects from several IPC nses 2021-11-20 10:35:54 -08:00
syscall.c y2038: remove CONFIG_64BIT_TIME 2019-11-15 14:38:27 +01:00
util.c ipc/util.c: cleanup and improve sysvipc_find_ipc() 2022-09-11 21:55:05 -07:00
util.h ipc/util.c: use binary search for max_idx 2021-07-01 11:06:07 -07:00