Skip to content
Commit f201ebd8 authored by zhong jiang's avatar zhong jiang Committed by Linus Torvalds
Browse files

mm/z3fold.c: limit first_num to the actual range of possible buddy indexes



At present, Tying the first_num size to NCHUNKS_ORDER is confusing.  the
number of chunks is completely unrelated to the number of buddies.

The patch limits the first_num to actual range of possible buddy indexes.
and that is more reasonable and obvious without functional change.

Link: http://lkml.kernel.org/r/1476776569-29504-1-git-send-email-zhongjiang@huawei.com
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Suggested-by: default avatarDan Streetman <ddstreet@ieee.org>
Acked-by: default avatarDan Streetman <ddstreet@ieee.org>
Acked-by: default avatarVitaly Wool <vitalywool@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 083fb8ed
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