]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - mm/slab.c
slab: fix regression in touched logic
[mirror_ubuntu-bionic-kernel.git] / mm / slab.c
index 7451bdacaf18875044ea97ed3d49da8c401d8249..f9626d51a4b1a4c1750bbbb38aab150af27daab0 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -935,7 +935,6 @@ static int transfer_objects(struct array_cache *to,
 
        from->avail -= nr;
        to->avail += nr;
-       to->touched = 1;
        return nr;
 }
 
@@ -2963,8 +2962,10 @@ retry:
        spin_lock(&l3->list_lock);
 
        /* See if we can refill from the shared array */
-       if (l3->shared && transfer_objects(ac, l3->shared, batchcount))
+       if (l3->shared && transfer_objects(ac, l3->shared, batchcount)) {
+               l3->shared->touched = 1;
                goto alloc_done;
+       }
 
        while (batchcount > 0) {
                struct list_head *entry;