bpf: Factor out hashtab bucket lock operations
authorThomas Gleixner <tglx@linutronix.de>
Mon, 24 Feb 2020 14:01:50 +0000 (15:01 +0100)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 25 Feb 2020 00:20:10 +0000 (16:20 -0800)
commitd01f9b198ca985b49717d8cd0b1f57806cb1319a
tree2c04f166fcf15540ae2183b0e089425a57bd41e9
parentb6e5dae15a61b0cc9219799926813baad0b58967
bpf: Factor out hashtab bucket lock operations

As a preparation for making the BPF locking RT friendly, factor out the
hash bucket lock operations into inline functions. This allows to do the
necessary RT modification in one place instead of sprinkling it all over
the place. No functional change.

The now unused htab argument of the lock/unlock functions will be used in
the next step which adds PREEMPT_RT support.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200224145644.420416916@linutronix.de
kernel/bpf/hashtab.c