diff options
author | Alexey Dobriyan <[email protected]> | 2018-04-05 16:21:43 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-04-05 21:36:24 -0700 |
commit | 870b1fbb036c0e115aeb8a48478643c16b73d204 (patch) | |
tree | a88600450425ba2c23be3b6c34927f45a3dc0776 | |
parent | 19af27aff901e401a5b79e5c974e881e4701162c (diff) |
slub: make size_from_object() return unsigned int
Function returns size of the object without red zone which can't be
negative.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Alexey Dobriyan <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/slub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slub.c b/mm/slub.c index 21e9de8f8d3a..f48d942a487e 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -466,7 +466,7 @@ static void get_map(struct kmem_cache *s, struct page *page, unsigned long *map) set_bit(slab_index(p, s, addr), map); } -static inline int size_from_object(struct kmem_cache *s) +static inline unsigned int size_from_object(struct kmem_cache *s) { if (s->flags & SLAB_RED_ZONE) return s->size - s->red_left_pad; |