]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/slob.c
slob: fix free block merging at head of subpage
[linux-2.6-omap-h63xx.git] / mm / slob.c
index 773a7aa80ab5ce53883cd7ad4d07a6019a175fe0..c56c5e57c19261b7ae26ff6468674cd618b8381b 100644 (file)
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -398,6 +398,10 @@ static void slob_free(void *block, int size)
        sp->units += units;
 
        if (b < sp->free) {
+               if (b + units == sp->free) {
+                       units += slob_units(sp->free);
+                       sp->free = slob_next(sp->free);
+               }
                set_slob(b, units, sp->free);
                sp->free = b;
        } else {