]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - ipc/shm.c
ipc: constify ipc_ops
[karo-tx-linux.git] / ipc / shm.c
index 76459616a7fafe7581d713a245c63e861a4cf631..b54c93f6d117aa869dc98d8b44b5f2618d7c935c 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -609,15 +609,15 @@ static inline int shm_more_checks(struct kern_ipc_perm *ipcp,
 SYSCALL_DEFINE3(shmget, key_t, key, size_t, size, int, shmflg)
 {
        struct ipc_namespace *ns;
-       struct ipc_ops shm_ops;
+       static const struct ipc_ops shm_ops = {
+               .getnew = newseg,
+               .associate = shm_security,
+               .more_checks = shm_more_checks,
+       };
        struct ipc_params shm_params;
 
        ns = current->nsproxy->ipc_ns;
 
-       shm_ops.getnew = newseg;
-       shm_ops.associate = shm_security;
-       shm_ops.more_checks = shm_more_checks;
-
        shm_params.key = key;
        shm_params.flg = shmflg;
        shm_params.u.size = size;