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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
This commit is contained in:
Wang Qing authored and Theodore Ts'o committed 2022-03-02 23:50:02 -05:00
1 parent b3998b3bc6
commit a861fb9fa5
1 file changed
+2 -1
+2 -1
View File
@@ -14,6 +14,7 @@
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/jiffies.h>
#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",