mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
ipc: simplify ipc initialization
Now that we know that rhashtable_init() will not fail, we can get rid of a lot of the unnecessary cleanup paths when the call errored out. [[email protected]: variable name added to util.h to resolve checkpatch warning] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Davidlohr Bueso <[email protected]> Signed-off-by: Manfred Spraul <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Kees Cook <[email protected]> Cc: Michael Kerrisk <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dc2c8c84de
commit
eae04d25a7
6 changed files with 30 additions and 54 deletions
|
|
@ -1238,7 +1238,7 @@ COMPAT_SYSCALL_DEFINE5(msgrcv, int, msqid, compat_uptr_t, msgp,
|
|||
}
|
||||
#endif
|
||||
|
||||
int msg_init_ns(struct ipc_namespace *ns)
|
||||
void msg_init_ns(struct ipc_namespace *ns)
|
||||
{
|
||||
ns->msg_ctlmax = MSGMAX;
|
||||
ns->msg_ctlmnb = MSGMNB;
|
||||
|
|
@ -1246,7 +1246,7 @@ int msg_init_ns(struct ipc_namespace *ns)
|
|||
|
||||
atomic_set(&ns->msg_bytes, 0);
|
||||
atomic_set(&ns->msg_hdrs, 0);
|
||||
return ipc_init_ids(&ns->ids[IPC_MSG_IDS]);
|
||||
ipc_init_ids(&ns->ids[IPC_MSG_IDS]);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IPC_NS
|
||||
|
|
@ -1287,12 +1287,11 @@ static int sysvipc_msg_proc_show(struct seq_file *s, void *it)
|
|||
}
|
||||
#endif
|
||||
|
||||
int __init msg_init(void)
|
||||
void __init msg_init(void)
|
||||
{
|
||||
const int err = msg_init_ns(&init_ipc_ns);
|
||||
msg_init_ns(&init_ipc_ns);
|
||||
|
||||
ipc_init_proc_interface("sysvipc/msg",
|
||||
" key msqid perms cbytes qnum lspid lrpid uid gid cuid cgid stime rtime ctime\n",
|
||||
IPC_MSG_IDS, sysvipc_msg_proc_show);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue