diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index 9f59fc16444b7cf0fbbfcc012d03f7104d8806a8..2b4417aa15d86a51db617bcbfd543824e7a77d21 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -100,7 +100,7 @@ struct kmem_cache { void (*ctor)(void *); int inuse; /* Offset to metadata */ 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 */ const char *name; /* Name (only for display!) */ struct list_head list; /* List of slab caches */ diff --git a/mm/slub.c b/mm/slub.c index 97dd2db30acbf2774a07c38ebf77307cd3e19f5d..e38221c13b073c4d2abc744ae647d8a4e6ef13c5 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -5094,7 +5094,7 @@ SLAB_ATTR_RO(destroy_by_rcu); 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);