Skip to content

Commit 3a04927

Browse files
q2venkuba-moo
authored andcommitted
af_unix: Remove module remnants.
Since commit 97154bc ("af_unix: Kconfig: make CONFIG_UNIX bool"), af_unix.c is no longer built as module. Let's remove unnecessary #if condition, exitcall, and module macros. Signed-off-by: Kuniyuki Iwashima <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 14da0d2 commit 3a04927

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed

net/unix/af_unix.c

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3344,7 +3344,7 @@ static const struct seq_operations unix_seq_ops = {
33443344
.show = unix_seq_show,
33453345
};
33463346

3347-
#if IS_BUILTIN(CONFIG_UNIX) && defined(CONFIG_BPF_SYSCALL)
3347+
#ifdef CONFIG_BPF_SYSCALL
33483348
struct bpf_unix_iter_state {
33493349
struct seq_net_private p;
33503350
unsigned int cur_sk;
@@ -3606,7 +3606,7 @@ static struct pernet_operations unix_net_ops = {
36063606
.exit = unix_net_exit,
36073607
};
36083608

3609-
#if IS_BUILTIN(CONFIG_UNIX) && defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS)
3609+
#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS)
36103610
DEFINE_BPF_ITER_FUNC(unix, struct bpf_iter_meta *meta,
36113611
struct unix_sock *unix_sk, uid_t uid)
36123612

@@ -3706,28 +3706,13 @@ static int __init af_unix_init(void)
37063706
register_pernet_subsys(&unix_net_ops);
37073707
unix_bpf_build_proto();
37083708

3709-
#if IS_BUILTIN(CONFIG_UNIX) && defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS)
3709+
#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_PROC_FS)
37103710
bpf_iter_register();
37113711
#endif
37123712

37133713
out:
37143714
return rc;
37153715
}
37163716

3717-
static void __exit af_unix_exit(void)
3718-
{
3719-
sock_unregister(PF_UNIX);
3720-
proto_unregister(&unix_dgram_proto);
3721-
proto_unregister(&unix_stream_proto);
3722-
unregister_pernet_subsys(&unix_net_ops);
3723-
}
3724-
3725-
/* Earlier than device_initcall() so that other drivers invoking
3726-
request_module() don't end up in a loop when modprobe tries
3727-
to use a UNIX socket. But later than subsys_initcall() because
3728-
we depend on stuff initialised there */
3717+
/* Later than subsys_initcall() because we depend on stuff initialised there */
37293718
fs_initcall(af_unix_init);
3730-
module_exit(af_unix_exit);
3731-
3732-
MODULE_LICENSE("GPL");
3733-
MODULE_ALIAS_NETPROTO(PF_UNIX);

0 commit comments

Comments
 (0)