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

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 <manfred@colorfullife.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Manfred Spraul and committed by
Linus Torvalds
f567a185 e57940d7

+7 -2
+7 -2
include/linux/sem.h
··· 96 96 int complex_count; /* pending complex operations */ 97 97 }; 98 98 99 + #ifdef CONFIG_SYSVIPC 100 + 99 101 struct sysv_sem { 100 102 struct sem_undo_list *undo_list; 101 103 }; 102 - 103 - #ifdef CONFIG_SYSVIPC 104 104 105 105 extern int copy_semundo(unsigned long clone_flags, struct task_struct *tsk); 106 106 extern void exit_sem(struct task_struct *tsk); 107 107 108 108 #else 109 + 110 + struct sysv_sem { 111 + /* empty */ 112 + }; 113 + 109 114 static inline int copy_semundo(unsigned long clone_flags, struct task_struct *tsk) 110 115 { 111 116 return 0;