diff options
author | wangkailong@jari.cn <wangkailong@jari.cn> | 2022-10-29 17:49:30 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2022-11-02 03:56:05 +0300 |
commit | 3b21b794b5797d35f4fad930b53b1cd881c12dd3 (patch) | |
tree | b497b0257580e2bdecd94580d5870f6c44b3350e /fs/f2fs | |
parent | e5a0db6a9e2eafe50e3ebc73a8285ae561e7d850 (diff) | |
download | linux-3b21b794b5797d35f4fad930b53b1cd881c12dd3.tar.xz |
f2fs: replace ternary operator with max()
Fix the following coccicheck warning:
./fs/f2fs/segment.c:877:24-25: WARNING opportunity for max()
Signed-off-by: KaiLong Wang <wangkailong@jari.cn>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index c4270cd6eaab..aa4be7f25963 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -856,7 +856,7 @@ block_t f2fs_get_unusable_blocks(struct f2fs_sb_info *sbi) } mutex_unlock(&dirty_i->seglist_lock); - unusable = holes[DATA] > holes[NODE] ? holes[DATA] : holes[NODE]; + unusable = max(holes[DATA], holes[NODE]); if (unusable > ovp_holes) return unusable - ovp_holes; return 0; |