Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: zbud: fix condition check on allocation size
zbud_alloc() incorrectly verifies the size of allocation limit. It should deny the allocation request greater than (PAGE_SIZE - ZHDR_SIZE_ALIGNED - CHUNK_SIZE), not (PAGE_SIZE - ZHDR_SIZE_ALIGNED) which has no remaining spaces for its buddy. There is no point in spending the entire zbud page storing only a single page, since we don't have any benefits. Signed-off-by: Heesub Shin <[email protected]> Acked-by: Seth Jennings <[email protected]> Cc: Bob Liu <[email protected]> Cc: Dongjun Shin <[email protected]> Cc: Sunae Seo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information