Revert "btrfs: compression: drop kmap/kunmap from lzo"
authorDavid Sterba <dsterba@suse.com>
Wed, 27 Oct 2021 08:44:21 +0000 (10:44 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 29 Oct 2021 11:25:43 +0000 (13:25 +0200)
commitccaa66c8dd277ac02f96914168bb7177f7ea8117
tree3731205a362c6bd3103e67bec62c03e0ca03e234
parent55276e14df4324ade34583adef110e11d249fb7b
Revert "btrfs: compression: drop kmap/kunmap from lzo"

This reverts commit 8c945d32e60427cbc0859cf7045bbe6196bb03d8.

The kmaps in compression code are still needed and cause crashes on
32bit machines (ARM, x86). Reproducible eg. by running fstest btrfs/004
with enabled LZO or ZSTD compression.

The revert does not apply cleanly due to changes in a6e66e6f8c1b
("btrfs: rework lzo_decompress_bio() to make it subpage compatible")
that reworked the page iteration so the revert is done to be equivalent
to the original code.

Link: https://lore.kernel.org/all/CAJCQCtT+OuemovPO7GZk8Y8=qtOObr0XTDp8jh4OHD6y84AFxw@mail.gmail.com/
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=214839
Tested-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/lzo.c