]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
lib: lz4: fixed zram with lz4 on big endian machines
authorRui Salvaterra <rsalvaterra@gmail.com>
Sat, 9 Apr 2016 21:05:34 +0000 (22:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2016 16:22:49 +0000 (09:22 -0700)
commit3e26a691fe3fe1e02a76e5bab0c143ace4b137b4
tree23d5c193d4729cc1ca7d691fab6e4524df8c8674
parent87243deb88671f70def4c52dfa7ca7830707bd31
lib: lz4: fixed zram with lz4 on big endian machines

Based on Sergey's test patch [1], this fixes zram with lz4 compression
on big endian cpus.

Note that the 64-bit preprocessor test is not a cleanup, it's part of
the fix, since those identifiers are bogus (for example, __ppc64__
isn't defined anywhere else in the kernel, which means we'd fall into
the 32-bit definitions on ppc64).

Tested on ppc64 with no regression on x86_64.

[1] http://marc.info/?l=linux-kernel&m=145994470805853&w=4

Cc: stable@vger.kernel.org
Suggested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/lz4/lz4defs.h