From: Wang Qing Date: Mon, 28 Feb 2022 03:15:20 +0000 (-0800) Subject: ext4: use time_is_before_jiffies() instead of open coding it X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a861fb9fa51da7b1957f612b742ce62a95591628;p=linux.git ext4: use time_is_before_jiffies() instead of open coding it Use the helper function time_is_{before,after}_jiffies() to improve code readability. Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1646018120-61462-1-git-send-email-wangqing@vivo.com Signed-off-by: Theodore Ts'o --- diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index f507f34be602f..90a941d20dfff 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -14,6 +14,7 @@ #include #include +#include #include "ext4_jbd2.h" @@ -2100,7 +2101,7 @@ retry: */ while (ext4_setup_next_flex_gd(sb, flex_gd, n_blocks_count, flexbg_size)) { - if (jiffies - last_update_time > HZ * 10) { + if (time_is_before_jiffies(last_update_time + HZ * 10)) { if (last_update_time) ext4_msg(sb, KERN_INFO, "resized to %llu blocks",