Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261653
b: refs/heads/master
c: 80f08c1
h: refs/heads/master
i:
  261651: 73de75b
v: v3
  • Loading branch information
Christoph Lameter authored and Pekka Enberg committed Jul 2, 2011
1 parent 6aecab9 commit bd5a7a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5c2e4bbbd60623f1024a753c291b666068f8a6e7
refs/heads/master: 80f08c191f6c9563641291bea80657a3b9faabf0
16 changes: 5 additions & 11 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2197,11 +2197,10 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
struct kmem_cache_node *n = NULL;
unsigned long uninitialized_var(flags);

local_irq_save(flags);
stat(s, FREE_SLOWPATH);

if (kmem_cache_debug(s) && !free_debug_processing(s, page, x, addr))
goto out_unlock;
return;

do {
prior = page->freelist;
Expand All @@ -2220,7 +2219,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
* Otherwise the list_lock will synchronize with
* other processors updating the list of slabs.
*/
spin_lock(&n->list_lock);
spin_lock_irqsave(&n->list_lock, flags);
}
inuse = new.inuse;

Expand All @@ -2236,7 +2235,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
*/
if (was_frozen)
stat(s, FREE_FROZEN);
goto out_unlock;
return;
}

/*
Expand All @@ -2259,11 +2258,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
stat(s, FREE_ADD_PARTIAL);
}
}

spin_unlock(&n->list_lock);

out_unlock:
local_irq_restore(flags);
spin_unlock_irqrestore(&n->list_lock, flags);
return;

slab_empty:
Expand All @@ -2275,8 +2270,7 @@ static void __slab_free(struct kmem_cache *s, struct page *page,
stat(s, FREE_REMOVE_PARTIAL);
}

spin_unlock(&n->list_lock);
local_irq_restore(flags);
spin_unlock_irqrestore(&n->list_lock, flags);
stat(s, FREE_SLAB);
discard_slab(s, page);
}
Expand Down

0 comments on commit bd5a7a2

Please sign in to comment.