]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-compaction-properly-signal-and-act-upon-lock-and-need_sched-contention-fix-2
authorVlastimil Babka <vbabka@suse.cz>
Mon, 2 Jun 2014 23:37:10 +0000 (09:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 2 Jun 2014 23:37:10 +0000 (09:37 +1000)
Step 1: Change function name and comment between v1 and v2 so that the return
        value signals the opposite thing.
Step 2: Change the call sites to reflect the opposite return value.
Step 3: ???
Step 4: Make a complete fool of yourself.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Reported-by: Kevin Hilman <khilman@linaro.org>
Reported-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c

index a525cd47a9d5f6697a7ffd5020e5ac7881a831d5..51750197db11d2b94793349c6e1204dd8bc6e65c 100644 (file)
@@ -237,13 +237,13 @@ static inline bool compact_should_abort(struct compact_control *cc)
        if (need_resched()) {
                if (cc->mode == MIGRATE_ASYNC) {
                        cc->contended = true;
-                       return false;
+                       return true;
                }
 
                cond_resched();
        }
 
-       return true;
+       return false;
 }
 
 /* Returns true if the page is within a block suitable for migration to */