]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: replace nested usage of min & max with clamp in btrfs_compress_set_level()
authorGeorge Hu <integral@archlinux.org>
Sat, 28 Jun 2025 05:21:30 +0000 (13:21 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:58:05 +0000 (23:58 +0200)
commitafd1dacbd0964c7d36a9057c39c168fe7fbb5196
tree36c84ed4384e14c6c56fba24fa13408af722dfd9
parent2fb5e56f524f7c0ca3ebda0069f8dd83b90876e5
btrfs: replace nested usage of min & max with clamp in btrfs_compress_set_level()

Refactor the btrfs_compress_set_level() function by replacing the
nested usage of min() and max() macro with clamp() to simplify the
code and improve readability.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: George Hu <integral@archlinux.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c