mm/slub: add missing TID updates on slab deactivation
[GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git] / mm / slub.c
index 0b13135fd5719e96745e8cf1958a39f9874ac0f4..c07c5fa6adcd1e7aae9f570a6a99cc99e281bbab 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2556,6 +2556,7 @@ redo:
                        deactivate_slab(s, page, c->freelist);
                        c->page = NULL;
                        c->freelist = NULL;
+                       c->tid = next_tid(c->tid);
                        goto new_slab;
                }
        }
@@ -2569,6 +2570,7 @@ redo:
                deactivate_slab(s, page, c->freelist);
                c->page = NULL;
                c->freelist = NULL;
+               c->tid = next_tid(c->tid);
                goto new_slab;
        }
 
@@ -2581,6 +2583,7 @@ redo:
 
        if (!freelist) {
                c->page = NULL;
+               c->tid = next_tid(c->tid);
                stat(s, DEACTIVATE_BYPASS);
                goto new_slab;
        }
@@ -2605,6 +2608,7 @@ new_slab:
                c->partial = page->next;
                stat(s, CPU_PARTIAL_ALLOC);
                c->freelist = NULL;
+               c->tid = next_tid(c->tid);
                goto redo;
        }
 
@@ -2627,6 +2631,7 @@ new_slab:
        deactivate_slab(s, page, get_freepointer(s, freelist));
        c->page = NULL;
        c->freelist = NULL;
+       c->tid = next_tid(c->tid);
        return freelist;
 }