diff options
author | Enzo Matsumiya <ematsumiya@suse.de> | 2024-09-16 13:30:49 -0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-09-16 20:10:39 -0500 |
commit | 5ac1f99fdd09d80223e8f47dffaea41a6563aace (patch) | |
tree | d8c4bea7ef360eefb35f2d5d2e3d3ce64176a97f /fs/smb/server | |
parent | 37408843f2ae03b027777f2ffa460e2eb0f3b292 (diff) |
smb: client: fix compression heuristic functions
Change is_compressible() return type to bool, use WARN_ON_ONCE(1) for
internal errors and return false for those.
Renames:
check_repeated_data -> has_repeated_data
check_ascii_bytes -> is_mostly_ascii (also refactor into a single loop)
calc_shannon_entropy -> has_low_entropy
Also wraps "wreq->Length" in le32_to_cpu() in should_compress() (caught
by sparse).
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/server')
0 files changed, 0 insertions, 0 deletions