bpf, inode: Remove second initialization of the bpf_preload_lock
authorMuhammad Usama Anjum <musamaanjum@gmail.com>
Mon, 5 Apr 2021 19:49:04 +0000 (00:49 +0500)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 6 Apr 2021 21:39:13 +0000 (23:39 +0200)
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>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210405194904.GA148013@LEGION
kernel/bpf/inode.c

index 1576ff3..f441d52 100644 (file)
@@ -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;