]> git.baikalelectronics.ru Git - kernel.git/commit
z3fold: fix header size related issues
authorVitaly Wool <vitalywool@gmail.com>
Fri, 24 Feb 2017 22:57:17 +0000 (14:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Feb 2017 01:46:54 +0000 (17:46 -0800)
commite0db34d25e20b6c6b97f9ae02ea00ae1c76cb131
tree9d1dafaa9b91260cc8f7d25af7d50c8809865338
parentcae7f0d33e38d964131f33ae806e1b43e5ce01e9
z3fold: fix header size related issues

Currently the whole kernel build will be stopped if the size of struct
z3fold_header is greater than the size of one chunk, which is 64 bytes
by default.  This patch instead defines the offset for z3fold objects as
the size of the z3fold header in chunks.

Fixed also are the calculation of num_free_chunks() and the address to
move the middle chunk to in case of in-page compaction in
z3fold_compact_page().

Link: http://lkml.kernel.org/r/20170131214057.d98677032bc7b1c6c59a80c9@gmail.com
Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Reviewed-by: Dan Streetman <ddstreet@ieee.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/z3fold.c