summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorHuang Ying <ying.huang@intel.com>2008-08-15 00:40:20 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-15 08:35:42 -0700
commit4cd69b986ebf0f8da93f82ffbb89c032ee09c2e1 (patch)
treecb4085d0b8f18e86b892c5bd88a5d6280c698300 /kernel
parentce289e89726948b50a58c9e8f4e81174a8c9c254 (diff)
downloadlwn-4cd69b986ebf0f8da93f82ffbb89c032ee09c2e1.tar.gz
lwn-4cd69b986ebf0f8da93f82ffbb89c032ee09c2e1.zip
kexec: fix compilation warning on xchg(&kexec_lock, 0) in kernel_kexec()
kernel/kexec.c: In function 'kernel_kexec': kernel/kexec.c:1506: warning: value computed is not used Signed-off-by: Huang Ying <ying.huang@intel.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index c8a4370e2a34..cf3797b76786 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1503,7 +1503,8 @@ int kernel_kexec(void)
}
Unlock:
- xchg(&kexec_lock, 0);
+ if (!xchg(&kexec_lock, 0))
+ BUG();
return error;
}