diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2017-11-17 15:31:08 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-17 16:10:04 -0800 |
commit | b8fd99838435f9b420c3e848192bd43abc648b7f (patch) | |
tree | 793a6390f29e27fcd9b87ba8b65c2480627491af /ipc/shm.c | |
parent | e35c4c64fe492b212f9c7d9e046626e48e89f863 (diff) | |
download | linux-rpi3-b8fd99838435f9b420c3e848192bd43abc648b7f.tar.gz linux-rpi3-b8fd99838435f9b420c3e848192bd43abc648b7f.tar.bz2 linux-rpi3-b8fd99838435f9b420c3e848192bd43abc648b7f.zip |
sysvipc: unteach ids->next_id for !CHECKPOINT_RESTORE
Patch series "sysvipc: ipc-key management improvements".
Here are a few improvements I spotted while eyeballing Guillaume's
rhashtable implementation for ipc keys. The first and fourth patches
are the interesting ones, the middle two are trivial.
This patch (of 4):
The next_id object-allocation functionality was introduced in commit
03f595668017 ("ipc: add sysctl to specify desired next object id").
Given that these new entries are _only_ exported under the
CONFIG_CHECKPOINT_RESTORE option, there is no point for the common case
to even know about ->next_id. As such rewrite ipc_buildid() such that
it can do away with the field as well as unnecessary branches when
adding a new identifier. The end result also better differentiates both
cases, so the code ends up being cleaner; albeit the small duplications
regarding the default case.
[akpm@linux-foundation.org: coding-style fixes]
Link: http://lkml.kernel.org/r/20170831172049.14576-2-dave@stgolabs.net
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/shm.c')
0 files changed, 0 insertions, 0 deletions