From: Manfred Spraul Date: Wed, 2 Nov 2011 20:38:56 +0000 (-0700) Subject: include/linux/sem.h: make sysv_sem empty if SYSVIPC is disabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f567a18590742b811287b7512fb0908deac4eef7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git include/linux/sem.h: make sysv_sem empty if SYSVIPC is disabled For the sysvsem undo, each task struct contains a sysv_sem structure with a pointer to the undo information. This pointer is only necessary if sysvipc is enabled - thus the pointer can be made conditional on CONFIG_SYSVIPC. Signed-off-by: Manfred Spraul Acked-by: Peter Zijlstra Cc: Thomas Gleixner Cc: Mike Galbraith Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/sem.h b/include/linux/sem.h index 464842621a4a..10d6b226afc5 100644 --- a/include/linux/sem.h +++ b/include/linux/sem.h @@ -96,16 +96,21 @@ struct sem_array { int complex_count; /* pending complex operations */ }; +#ifdef CONFIG_SYSVIPC + struct sysv_sem { struct sem_undo_list *undo_list; }; -#ifdef CONFIG_SYSVIPC - extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); extern void exit_sem(struct task_struct *tsk); #else + +struct sysv_sem { + /* empty */ +}; + static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) { return 0;