2005-03-08 17:56:34

by Coywolf Qi Hunt

[permalink] [raw]
Subject: [patch] remove barrier() in software_resume()

Hello,

This patch removes the redundant compiler barrier. As Linus ever said
"The mb() should make sure that gcc cannot move things around...".

--coywolf

Signed-off-by: Coywolf Qi Hunt <[email protected]>

diff -Nrup 2.6.11/kernel/power/disk.c 2.6.11-cy/kernel/power/disk.c
--- 2.6.11/kernel/power/disk.c 2005-03-03 17:12:17.000000000 +0800
+++ 2.6.11-cy/kernel/power/disk.c 2005-03-09 01:47:10.000000000 +0800
@@ -233,7 +233,6 @@ static int software_resume(void)
if ((error = prepare()))
goto Free;

- barrier();
mb();

pr_debug("PM: Restoring saved image.\n");

--
Coywolf Qi Hunt
Homepage http://sosdg.org/~coywolf/