diff options
author | Wang Qing <wangqing@vivo.com> | 2022-02-28 06:15:20 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-03-03 07:50:02 +0300 |
commit | a861fb9fa51da7b1957f612b742ce62a95591628 (patch) | |
tree | ebad55086e6a7fa53915ceaae49ee225a83d1431 /fs/ext4 | |
parent | b3998b3bc658017dc36c69a8224fb11a3d1b1382 (diff) | |
download | linux-a861fb9fa51da7b1957f612b742ce62a95591628.tar.xz |
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 <wangqing@vivo.com>
Link: https://lore.kernel.org/r/1646018120-61462-1-git-send-email-wangqing@vivo.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/resize.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index f507f34be602..90a941d20dff 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c @@ -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", |