Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346876
b: refs/heads/master
c: 242860a
h: refs/heads/master
v: v3
  • Loading branch information
Ezequiel Garcia authored and Pekka Enberg committed Oct 31, 2012
1 parent ead670b commit f8f94d1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 23 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: fe74fe2bf293d061826f0d7afc2ca8456bdbb40e
refs/heads/master: 242860a47a75b933a79a30f6a40bf4858f4a3ecc
9 changes: 8 additions & 1 deletion trunk/include/linux/slab.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
void kmem_cache_destroy(struct kmem_cache *);
int kmem_cache_shrink(struct kmem_cache *);
void kmem_cache_free(struct kmem_cache *, void *);
unsigned int kmem_cache_size(struct kmem_cache *);

/*
* Please use this macro to create slab caches. Simply specify the
Expand Down Expand Up @@ -388,6 +387,14 @@ static inline void *kzalloc_node(size_t size, gfp_t flags, int node)
return kmalloc_node(size, flags | __GFP_ZERO, node);
}

/*
* Determine the size of a slab object
*/
static inline unsigned int kmem_cache_size(struct kmem_cache *s)
{
return s->object_size;
}

void __init kmem_cache_init_late(void);

#endif /* _LINUX_SLAB_H */
6 changes: 0 additions & 6 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -3969,12 +3969,6 @@ void kfree(const void *objp)
}
EXPORT_SYMBOL(kfree);

unsigned int kmem_cache_size(struct kmem_cache *cachep)
{
return cachep->object_size;
}
EXPORT_SYMBOL(kmem_cache_size);

/*
* This initializes kmem_list3 or resizes various caches for all nodes.
*/
Expand Down
6 changes: 0 additions & 6 deletions trunk/mm/slob.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,6 @@ void kmem_cache_free(struct kmem_cache *c, void *b)
}
EXPORT_SYMBOL(kmem_cache_free);

unsigned int kmem_cache_size(struct kmem_cache *c)
{
return c->object_size;
}
EXPORT_SYMBOL(kmem_cache_size);

int __kmem_cache_shutdown(struct kmem_cache *c)
{
/* No way to check for remaining objects */
Expand Down
9 changes: 0 additions & 9 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -3121,15 +3121,6 @@ static int kmem_cache_open(struct kmem_cache *s, unsigned long flags)
return -EINVAL;
}

/*
* Determine the size of a slab object
*/
unsigned int kmem_cache_size(struct kmem_cache *s)
{
return s->object_size;
}
EXPORT_SYMBOL(kmem_cache_size);

static void list_slab_objects(struct kmem_cache *s, struct page *page,
const char *text)
{
Expand Down

0 comments on commit f8f94d1

Please sign in to comment.