summaryrefslogtreecommitdiff
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2023-07-12 19:23:31 +0300
committerKees Cook <keescook@chromium.org>2023-07-18 02:08:58 +0300
commit1756ddea6916669125933a8625120c84b57f6559 (patch)
tree506c7dd337aea802b33033ea2a0594f475d80f77 /fs/reiserfs
parentfdf0eaf11452d72945af31804e2a1048ee1b574c (diff)
downloadlinux-1756ddea6916669125933a8625120c84b57f6559.tar.xz
pstore: Remove worst-case compression size logic
The worst case compression size used by pstore gives an upper bound for how much the data might inadvertently *grow* due to encapsulation overhead if the input is not compressible at all. Given that pstore records have individual 'compressed' flags, we can simply store the uncompressed data if compressing it would end up using more space, making the worst case identical to the uncompressed case. This means we can just drop all the elaborate logic that reasons about upper bounds for each individual compression algorithm, and just store the uncompressed data directly if compression fails for any reason. Co-developed-by: Kees Cook <keescook@chromium.org> Tested-by: "Guilherme G. Piccoli" <gpiccoli@igalia.com> # Steam Deck Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20230712162332.2670437-2-ardb@kernel.org Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'fs/reiserfs')
0 files changed, 0 insertions, 0 deletions