]> Gentwo Git Trees - linux/.git/commit
ext4: replace min/max nesting with clamp()
authorXichao Zhao <zhao.xichao@vivo.com>
Mon, 18 Aug 2025 07:28:59 +0000 (15:28 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 25 Sep 2025 18:35:21 +0000 (14:35 -0400)
commit981b696faf2d59a58d1dc8e258bba00b12e5de93
tree02e3b4bafa012f6b6f89cfa6532d0da7f1e9022f
parent1534f72dc2a11ded38b0e0268fbcc0ca24e9fd4a
ext4: replace min/max nesting with clamp()

The clamp() macro explicitly expresses the intent of constraining a value
within bounds.Therefore, replacing max(min(a,b),c) with clamp(val, lo, hi)
can improve code readability.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mmp.c