Commit 38cd5b12 authored by Alexey Gladkov's avatar Alexey Gladkov Committed by Eric W. Biederman

ipc: Remove extra braces

Fix coding style. In the previous commit, I added braces because,
in addition to changing .data, .extra1 also changed. Now this is not
needed.

Fixes: 1f5c135e ("ipc: Store ipc sysctls in the ipc namespace")
Signed-off-by: default avatarAlexey Gladkov <legion@kernel.org>
Link: https://lkml.kernel.org/r/37687827f630bc150210f5b8abeeb00f1336814e.1651584847.git.legion@kernel.orgSigned-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
parent 0889f44e
...@@ -222,43 +222,42 @@ bool setup_ipc_sysctls(struct ipc_namespace *ns) ...@@ -222,43 +222,42 @@ bool setup_ipc_sysctls(struct ipc_namespace *ns)
int i; int i;
for (i = 0; i < ARRAY_SIZE(ipc_sysctls); i++) { for (i = 0; i < ARRAY_SIZE(ipc_sysctls); i++) {
if (tbl[i].data == &init_ipc_ns.shm_ctlmax) { if (tbl[i].data == &init_ipc_ns.shm_ctlmax)
tbl[i].data = &ns->shm_ctlmax; tbl[i].data = &ns->shm_ctlmax;
} else if (tbl[i].data == &init_ipc_ns.shm_ctlall) { else if (tbl[i].data == &init_ipc_ns.shm_ctlall)
tbl[i].data = &ns->shm_ctlall; tbl[i].data = &ns->shm_ctlall;
} else if (tbl[i].data == &init_ipc_ns.shm_ctlmni) { else if (tbl[i].data == &init_ipc_ns.shm_ctlmni)
tbl[i].data = &ns->shm_ctlmni; tbl[i].data = &ns->shm_ctlmni;
} else if (tbl[i].data == &init_ipc_ns.shm_rmid_forced) { else if (tbl[i].data == &init_ipc_ns.shm_rmid_forced)
tbl[i].data = &ns->shm_rmid_forced; tbl[i].data = &ns->shm_rmid_forced;
} else if (tbl[i].data == &init_ipc_ns.msg_ctlmax) { else if (tbl[i].data == &init_ipc_ns.msg_ctlmax)
tbl[i].data = &ns->msg_ctlmax; tbl[i].data = &ns->msg_ctlmax;
} else if (tbl[i].data == &init_ipc_ns.msg_ctlmni) { else if (tbl[i].data == &init_ipc_ns.msg_ctlmni)
tbl[i].data = &ns->msg_ctlmni; tbl[i].data = &ns->msg_ctlmni;
} else if (tbl[i].data == &init_ipc_ns.msg_ctlmnb) { else if (tbl[i].data == &init_ipc_ns.msg_ctlmnb)
tbl[i].data = &ns->msg_ctlmnb; tbl[i].data = &ns->msg_ctlmnb;
} else if (tbl[i].data == &init_ipc_ns.sem_ctls) { else if (tbl[i].data == &init_ipc_ns.sem_ctls)
tbl[i].data = &ns->sem_ctls; tbl[i].data = &ns->sem_ctls;
#ifdef CONFIG_CHECKPOINT_RESTORE #ifdef CONFIG_CHECKPOINT_RESTORE
} else if (tbl[i].data == &init_ipc_ns.ids[IPC_SEM_IDS].next_id) { else if (tbl[i].data == &init_ipc_ns.ids[IPC_SEM_IDS].next_id)
tbl[i].data = &ns->ids[IPC_SEM_IDS].next_id; tbl[i].data = &ns->ids[IPC_SEM_IDS].next_id;
} else if (tbl[i].data == &init_ipc_ns.ids[IPC_MSG_IDS].next_id) { else if (tbl[i].data == &init_ipc_ns.ids[IPC_MSG_IDS].next_id)
tbl[i].data = &ns->ids[IPC_MSG_IDS].next_id; tbl[i].data = &ns->ids[IPC_MSG_IDS].next_id;
} else if (tbl[i].data == &init_ipc_ns.ids[IPC_SHM_IDS].next_id) { else if (tbl[i].data == &init_ipc_ns.ids[IPC_SHM_IDS].next_id)
tbl[i].data = &ns->ids[IPC_SHM_IDS].next_id; tbl[i].data = &ns->ids[IPC_SHM_IDS].next_id;
#endif #endif
} else { else
tbl[i].data = NULL; tbl[i].data = NULL;
} }
}
ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set, "kernel", tbl); ns->ipc_sysctls = __register_sysctl_table(&ns->ipc_set, "kernel", tbl);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment