Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

shm: Move struct shmid_kernel into ipc/shm.c

All of the users are now in ipc/shm.c so make the definition local to
that file to make code maintenance easier. AKA to prevent rebuilding
the entire kernel when struct shmid_kernel changes.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>

+22 -22
-22
include/linux/shm.h
··· 7 7 #include <uapi/linux/shm.h> 8 8 #include <asm/shmparam.h> 9 9 10 - struct shmid_kernel /* private to the kernel */ 11 - { 12 - struct kern_ipc_perm shm_perm; 13 - struct file *shm_file; 14 - unsigned long shm_nattch; 15 - unsigned long shm_segsz; 16 - time64_t shm_atim; 17 - time64_t shm_dtim; 18 - time64_t shm_ctim; 19 - pid_t shm_cprid; 20 - pid_t shm_lprid; 21 - struct user_struct *mlock_user; 22 - 23 - /* The task created the shm object. NULL if the task is dead. */ 24 - struct task_struct *shm_creator; 25 - struct list_head shm_clist; /* list by creator */ 26 - } __randomize_layout; 27 - 28 - /* shm_mode upper byte flags */ 29 - #define SHM_DEST 01000 /* segment will be destroyed on last detach */ 30 - #define SHM_LOCKED 02000 /* segment will not be swapped */ 31 - 32 10 #ifdef CONFIG_SYSVIPC 33 11 struct sysv_shm { 34 12 struct list_head shm_clist;
+22
ipc/shm.c
··· 48 48 49 49 #include "util.h" 50 50 51 + struct shmid_kernel /* private to the kernel */ 52 + { 53 + struct kern_ipc_perm shm_perm; 54 + struct file *shm_file; 55 + unsigned long shm_nattch; 56 + unsigned long shm_segsz; 57 + time64_t shm_atim; 58 + time64_t shm_dtim; 59 + time64_t shm_ctim; 60 + pid_t shm_cprid; 61 + pid_t shm_lprid; 62 + struct user_struct *mlock_user; 63 + 64 + /* The task created the shm object. NULL if the task is dead. */ 65 + struct task_struct *shm_creator; 66 + struct list_head shm_clist; /* list by creator */ 67 + } __randomize_layout; 68 + 69 + /* shm_mode upper byte flags */ 70 + #define SHM_DEST 01000 /* segment will be destroyed on last detach */ 71 + #define SHM_LOCKED 02000 /* segment will not be swapped */ 72 + 51 73 struct shm_file_data { 52 74 int id; 53 75 struct ipc_namespace *ns;