Export shmctl_down() which will be used in the next patch during restart to delete an ipc shm (the shm is mapped already, so it won't be lost). Signed-off-by: Oren Laadan <orenl@xxxxxxxxxxxxxxx> --- include/linux/shm.h | 4 ++++ ipc/shm.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/linux/shm.h b/include/linux/shm.h index 1122197..524fb3b 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h @@ -127,6 +127,10 @@ define ipcshm_restart NULL #endif #endif +struct ipc_namespace; +extern int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, + struct shmid_ds __user *buf, int version); + #endif /* __KERNEL__ */ #endif /* _LINUX_SHM_H_ */ diff --git a/ipc/shm.c b/ipc/shm.c index 5625dbf..70e0651 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -673,8 +673,8 @@ static void shm_get_stat(struct ipc_namespace *ns, unsigned long *rss, * to be held in write mode. * NOTE: no locks must be held, the rw_mutex is taken inside this function. */ -static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, - struct shmid_ds __user *buf, int version) +int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, + struct shmid_ds __user *buf, int version) { struct kern_ipc_perm *ipcp; struct shmid64_ds shmid64; -- 1.5.4.3 _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers