netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] inode: Remove second initialization of the bpf_preload_lock
@ 2021-04-05 19:49 Muhammad Usama Anjum
  2021-04-06 21:59 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Muhammad Usama Anjum @ 2021-04-05 19:49 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, open list:BPF (Safe dynamic programs and tools),
	open list:BPF (Safe dynamic programs and tools), open list,
	zhengyongjun3, dan.carpenter
  Cc: musamaanjum

bpf_preload_lock is already defined with DEFINE_MUTEX. There is no need
to initialize it again. Remove the extraneous initialization.

Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
---
 kernel/bpf/inode.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c
index 1576ff331ee4..f441d521ef77 100644
--- a/kernel/bpf/inode.c
+++ b/kernel/bpf/inode.c
@@ -816,8 +816,6 @@ static int __init bpf_init(void)
 {
 	int ret;
 
-	mutex_init(&bpf_preload_lock);
-
 	ret = sysfs_create_mount_point(fs_kobj, "bpf");
 	if (ret)
 		return ret;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-06 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-05 19:49 [PATCH] inode: Remove second initialization of the bpf_preload_lock Muhammad Usama Anjum
2021-04-06 21:59 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).