summaryrefslogtreecommitdiff
path: root/kernel/bpf/cpumask.c
diff options
context:
space:
mode:
authorDavid Vernet <void@manifault.com>2023-03-26 00:31:45 +0300
committerAlexei Starovoitov <ast@kernel.org>2023-03-26 02:56:22 +0300
commitfb2211a57c110b4ced3cb7f8570bd7246acf2d04 (patch)
tree1d94a550acc6b2ee4a15129002a1a3bbbbea80b3 /kernel/bpf/cpumask.c
parent1431d0b584a673ea690c88a5f7e1aedd9caf0e84 (diff)
downloadlinux-fb2211a57c110b4ced3cb7f8570bd7246acf2d04.tar.xz
bpf: Remove now-unnecessary NULL checks for KF_RELEASE kfuncs
Now that we're not invoking kfunc destructors when the kptr in a map was NULL, we no longer require NULL checks in many of our KF_RELEASE kfuncs. This patch removes those NULL checks. Signed-off-by: David Vernet <void@manifault.com> Link: https://lore.kernel.org/r/20230325213144.486885-3-void@manifault.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/cpumask.c')
-rw-r--r--kernel/bpf/cpumask.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/bpf/cpumask.c b/kernel/bpf/cpumask.c
index db9da2194c1a..e991af7dc13c 100644
--- a/kernel/bpf/cpumask.c
+++ b/kernel/bpf/cpumask.c
@@ -102,9 +102,6 @@ static void cpumask_free_cb(struct rcu_head *head)
*/
__bpf_kfunc void bpf_cpumask_release(struct bpf_cpumask *cpumask)
{
- if (!cpumask)
- return;
-
if (refcount_dec_and_test(&cpumask->usage))
call_rcu(&cpumask->rcu, cpumask_free_cb);
}