diff options
author | Christoph Lameter <clameter@sgi.com> | 2008-04-14 11:52:18 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-04-14 11:52:18 -0400 |
commit | 49bd5221ce8fb55d12c04a3ffd375201c5bbfb7a (patch) | |
tree | 8569f6898326ae3ccbd24309dc0dd53707b11220 | |
parent | 50ef37b96c11e76625067ae413dc54585ea22585 (diff) |
slub: Move map/flag clearing to __free_slab
__free_slab does some diagnostics. The resetting of mapcount etc
in discard_slab() can interfere with debug processing. So move
the reset immediately before the page is freed.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
-rw-r--r-- | mm/slub.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1125,6 +1125,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page) | |||
1125 | NR_SLAB_RECLAIMABLE : NR_SLAB_UNRECLAIMABLE, | 1125 | NR_SLAB_RECLAIMABLE : NR_SLAB_UNRECLAIMABLE, |
1126 | -pages); | 1126 | -pages); |
1127 | 1127 | ||
1128 | __ClearPageSlab(page); | ||
1129 | reset_page_mapcount(page); | ||
1128 | __free_pages(page, s->order); | 1130 | __free_pages(page, s->order); |
1129 | } | 1131 | } |
1130 | 1132 | ||
@@ -1154,8 +1156,6 @@ static void discard_slab(struct kmem_cache *s, struct page *page) | |||
1154 | struct kmem_cache_node *n = get_node(s, page_to_nid(page)); | 1156 | struct kmem_cache_node *n = get_node(s, page_to_nid(page)); |
1155 | 1157 | ||
1156 | atomic_long_dec(&n->nr_slabs); | 1158 | atomic_long_dec(&n->nr_slabs); |
1157 | reset_page_mapcount(page); | ||
1158 | __ClearPageSlab(page); | ||
1159 | free_slab(s, page); | 1159 | free_slab(s, page); |
1160 | } | 1160 | } |
1161 | 1161 | ||