From: Wei Yang Date: Fri, 6 Nov 2015 02:45:48 +0000 (-0800) Subject: mm/slub: use get_order() instead of fls() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=033fd1bd3c50fdda267d27d02f9bc656f0b9ddb8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mm/slub: use get_order() instead of fls() get_order() is more easy to understand. This patch just replaces it. Signed-off-by: Wei Yang Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Reviewed-by: Pekka Enberg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/slub.c b/mm/slub.c index a94b9f46261b..e309ed140fd1 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2912,8 +2912,7 @@ static inline int slab_order(int size, int min_objects, if (order_objects(min_order, size, reserved) > MAX_OBJS_PER_PAGE) return get_order(size * MAX_OBJS_PER_PAGE) - 1; - for (order = max(min_order, - fls(min_objects * size - 1) - PAGE_SHIFT); + for (order = max(min_order, get_order(min_objects * size)); order <= max_order; order++) { unsigned long slab_size = PAGE_SIZE << order;