Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98815
b: refs/heads/master
c: bdb2192
h: refs/heads/master
i:
  98813: 57f304c
  98811: cfa7720
  98807: 1ad2ee3
  98799: 10b0c61
  98783: 8e5cad9
  98751: 9b6ab53
  98687: 116eb12
  98559: b15503f
  98303: 8d3fd52
v: v3
  • Loading branch information
Dmitry Adamushko authored and Linus Torvalds committed Jul 10, 2008
1 parent f92845f commit e5ca9c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: 96a8e13ed44e380fc2bb6c711d74d5ba698c00b2
refs/heads/master: bdb21928512a860a60e6a24a849dc5b63cbaf96a
4 changes: 3 additions & 1 deletion trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,9 +1628,11 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
void **object;
struct kmem_cache_cpu *c;
unsigned long flags;
unsigned int objsize;

local_irq_save(flags);
c = get_cpu_slab(s, smp_processor_id());
objsize = c->objsize;
if (unlikely(!c->freelist || !node_match(c, node)))

object = __slab_alloc(s, gfpflags, node, addr, c);
Expand All @@ -1643,7 +1645,7 @@ static __always_inline void *slab_alloc(struct kmem_cache *s,
local_irq_restore(flags);

if (unlikely((gfpflags & __GFP_ZERO) && object))
memset(object, 0, c->objsize);
memset(object, 0, objsize);

return object;
}
Expand Down

0 comments on commit e5ca9c2

Please sign in to comment.