aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yang <[email protected]>2015-11-05 18:45:48 -0800
committerLinus Torvalds <[email protected]>2015-11-05 19:34:48 -0800
commit033fd1bd3c50fdda267d27d02f9bc656f0b9ddb8 (patch)
tree74b742a65bc35c7a5aba4189c988f6ca621f1d4e
parent422ff4d70c1b3b2deed431dc095432dc691f4269 (diff)
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 <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: David Rientjes <[email protected]> Cc: Joonsoo Kim <[email protected]> Reviewed-by: Pekka Enberg <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/slub.c3
1 files changed, 1 insertions, 2 deletions
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;