Commit d66e52d1 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

slub: make ->reserved unsigned int

->reserved is either 0 or sizeof(struct rcu_head), can't be negative.

Link: http://lkml.kernel.org/r/20180305200730.15812-12-adobriyan@gmail.comSigned-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Acked-by: default avatarChristoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2ca6d39b
...@@ -100,7 +100,7 @@ struct kmem_cache { ...@@ -100,7 +100,7 @@ struct kmem_cache {
void (*ctor)(void *); void (*ctor)(void *);
int inuse; /* Offset to metadata */ int inuse; /* Offset to metadata */
int align; /* Alignment */ int align; /* Alignment */
int reserved; /* Reserved bytes at the end of slabs */ unsigned int reserved; /* Reserved bytes at the end of slabs */
unsigned int red_left_pad; /* Left redzone padding size */ unsigned int red_left_pad; /* Left redzone padding size */
const char *name; /* Name (only for display!) */ const char *name; /* Name (only for display!) */
struct list_head list; /* List of slab caches */ struct list_head list; /* List of slab caches */
......
...@@ -5094,7 +5094,7 @@ SLAB_ATTR_RO(destroy_by_rcu); ...@@ -5094,7 +5094,7 @@ SLAB_ATTR_RO(destroy_by_rcu);
static ssize_t reserved_show(struct kmem_cache *s, char *buf) static ssize_t reserved_show(struct kmem_cache *s, char *buf)
{ {
return sprintf(buf, "%d\n", s->reserved); return sprintf(buf, "%u\n", s->reserved);
} }
SLAB_ATTR_RO(reserved); SLAB_ATTR_RO(reserved);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment