diff options
author | Wang Qing <wangqing@vivo.com> | 2022-02-28 04:15:20 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2022-03-03 05:50:02 +0100 |
commit | a861fb9fa51da7b1957f612b742ce62a95591628 (patch) | |
tree | ebad55086e6a7fa53915ceaae49ee225a83d1431 /fs/ext4 | |
parent | ext4: improve fast_commit performance and scalability (diff) | |
download | linux-a861fb9fa51da7b1957f612b742ce62a95591628.tar.xz linux-a861fb9fa51da7b1957f612b742ce62a95591628.zip |
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", |