[PATCH] fs: iomap: replace the ternary conditional operator with max_t()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It would be better to replace the traditional ternary conditional
operator with max_t() in iomap_iter

Signed-off-by: Lu Hongfei <luhongfei@xxxxxxxx>
---
 fs/iomap/iter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/iomap/iter.c b/fs/iomap/iter.c
index 79a0614eaab7..528fd196c50b 100644
--- a/fs/iomap/iter.c
+++ b/fs/iomap/iter.c
@@ -77,7 +77,7 @@ int iomap_iter(struct iomap_iter *iter, const struct iomap_ops *ops)
 
 	if (iter->iomap.length && ops->iomap_end) {
 		ret = ops->iomap_end(iter->inode, iter->pos, iomap_length(iter),
-				iter->processed > 0 ? iter->processed : 0,
+				max_t(s64, iter->processed, 0),
 				iter->flags, &iter->iomap);
 		if (ret < 0 && !iter->processed)
 			return ret;
-- 
2.39.0




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux