diff options
author | Kemeng Shi <shikemeng@huaweicloud.com> | 2023-08-01 22:32:00 +0800 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-08-03 10:47:30 -0400 |
commit | de8bf0e5ee7482585450357c6d4eddec8efc5cb7 (patch) | |
tree | bad34d7fb1515b0994627a48e309f4ba49079a93 /fs/ext4 | |
parent | ad635507b5b22d59457b6db6d8a0e4ddf7ad2b4c (diff) |
ext4: replace the traditional ternary conditional operator with with max()/min()
Replace the traditional ternary conditional operator with with max()/min()
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20230801143204.2284343-7-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/mballoc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 154ae1fca10c..f0deb5f2f81d 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -6917,8 +6917,7 @@ __releases(ext4_group_lock_ptr(sb, e4b->bd_group)) void *bitmap; bitmap = e4b->bd_bitmap; - start = (e4b->bd_info->bb_first_free > start) ? - e4b->bd_info->bb_first_free : start; + start = max(e4b->bd_info->bb_first_free, start); count = 0; free_count = 0; @@ -7135,8 +7134,7 @@ ext4_mballoc_query_range( ext4_lock_group(sb, group); - start = (e4b.bd_info->bb_first_free > start) ? - e4b.bd_info->bb_first_free : start; + start = max(e4b.bd_info->bb_first_free, start); if (end >= EXT4_CLUSTERS_PER_GROUP(sb)) end = EXT4_CLUSTERS_PER_GROUP(sb) - 1; |