summaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-12-28 03:40:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-28 15:11:52 -0500
commit0f4991e8fd48987ae476a92cdee6bfec4aff31b8 (patch)
treeac2c4d96bde3b7782b89f99b3561c84b7b7d857a /kernel/fork.c
parent7056d3a37d2c6aaaab10c13e8e69adc67ec1fc65 (diff)
kernel/fork.c: mark 'stack_vm_area' with __maybe_unused
Fixes gcc '-Wunused-but-set-variable' warning when CONFIG_VMAP_STACK is not set: kernel/fork.c: In function 'dup_task_struct': kernel/fork.c:843:20: warning: variable 'stack_vm_area' set but not used [-Wunused-but-set-variable] Link: http://lkml.kernel.org/r/1545965190-2381-1-git-send-email-yuehaibing@huawei.com Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index c979605fe806..d439c48ecf18 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -841,7 +841,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig, int node)
841{ 841{
842 struct task_struct *tsk; 842 struct task_struct *tsk;
843 unsigned long *stack; 843 unsigned long *stack;
844 struct vm_struct *stack_vm_area; 844 struct vm_struct *stack_vm_area __maybe_unused;
845 int err; 845 int err;
846 846
847 if (node == NUMA_NO_NODE) 847 if (node == NUMA_NO_NODE)