]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 20 Apr 2016 05:08:56 +0000 (01:08 -0400)
commitda56dbeaede73d918312d3b5f15b2944d35de9da
tree62037d8b546065658eb2909b11d5fad5db26bfdc
parentbd58e66e02c6d59997121936d755f2e39cb10653
lib: lz4: fixed zram with lz4 on big endian machines

[ Upstream commit 3e26a691fe3fe1e02a76e5bab0c143ace4b137b4 ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
lib/lz4/lz4defs.h