proc: move /proc/sysvipc creation to where it belongs
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 10 Apr 2018 23:30:58 +0000 (16:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Apr 2018 17:28:33 +0000 (10:28 -0700)
Move the proc_mkdir() call within the sysvipc subsystem such that we
avoid polluting proc_root_init() with petty cpp.

[dave@stgolabs.net: contributed changelog]
Link: http://lkml.kernel.org/r/20180216161732.GA10297@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/root.c
ipc/util.c

index ede8e64974be240368d11ab47f3227f72a016e23..4a19e02c7ed059439740a45bec3587f9471bc6c7 100644 (file)
@@ -136,10 +136,6 @@ void __init proc_root_init(void)
        proc_symlink("mounts", NULL, "self/mounts");
 
        proc_net_init();
-
-#ifdef CONFIG_SYSVIPC
-       proc_mkdir("sysvipc", NULL);
-#endif
        proc_mkdir("fs", NULL);
        proc_mkdir("driver", NULL);
        proc_create_mount_point("fs/nfsd"); /* somewhere for the nfsd filesystem to be mounted */
index 3783b7991cc7e2b10745d36d933f66f5fd68bcda..4e81182fa0ac48cad2ed3f5afdd8141e161a920b 100644 (file)
@@ -89,6 +89,7 @@ static int __init ipc_init(void)
 {
        int err_sem, err_msg;
 
+       proc_mkdir("sysvipc", NULL);
        err_sem = sem_init();
        WARN(err_sem, "ipc: sysv sem_init failed: %d\n", err_sem);
        err_msg = msg_init();