The patch titled Subject: md: use time_is_before_eq_jiffies() instead of open coding it has been added to the -mm tree. Its filename is md-use-time_is_before_eq_jiffies-instead-of-open-coding-it.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/md-use-time_is_before_eq_jiffies-instead-of-open-coding-it.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/md-use-time_is_before_eq_jiffies-instead-of-open-coding-it.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Wang Qing <wangqing@xxxxxxxx> Subject: md: use time_is_before_eq_jiffies() instead of open coding it Use the helper function time_is_{before,after}_jiffies() to improve code readability. Link: https://lkml.kernel.org/r/1650621172-66967-7-git-send-email-wangqing@xxxxxxxx Signed-off-by: Wang Qing <wangqing@xxxxxxxx> Cc: Alasdair Kergon <agk@xxxxxxxxxx> Cc: Mike Snitzer <snitzer@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/md/dm-writecache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/md/dm-writecache.c~md-use-time_is_before_eq_jiffies-instead-of-open-coding-it +++ a/drivers/md/dm-writecache.c @@ -16,6 +16,7 @@ #include <linux/pfn_t.h> #include <linux/libnvdimm.h> #include <linux/delay.h> +#include <linux/jiffies.h> #include "dm-io-tracker.h" #define DM_MSG_PREFIX "writecache" @@ -1971,8 +1972,8 @@ restart: while (!list_empty(&wc->lru) && (wc->writeback_all || wc->freelist_size + wc->writeback_size <= wc->freelist_low_watermark || - (jiffies - container_of(wc->lru.prev, struct wc_entry, lru)->age >= - wc->max_age - wc->max_age / MAX_AGE_DIV))) { + time_is_before_eq_jiffies(container_of(wc->lru.prev, struct wc_entry, + lru)->age + wc->max_age - wc->max_age / MAX_AGE_DIV)) { n_walked++; if (unlikely(n_walked > WRITEBACK_LATENCY) && _ Patches currently in -mm which might be from wangqing@xxxxxxxx are block-xen-use-time_is_before_eq_jiffies-instead-of-open-coding-it.patch gpu-drm-i915-use-time_is_after_jiffies-instead-of-open-coding-it.patch gpu-drm-radeon-use-time_is_before_jiffies-instead-of-open-coding-it.patch hid-use-time_is_after_jiffies-instead-of-open-coding-it.patch md-use-time_is_before_eq_jiffies-instead-of-open-coding-it.patch net-wireless-marvell-use-time_is_before_jiffies-instead-of-open-coding-it.patch scsi-bfa-use-time_is_before_jiffies-instead-of-open-coding-it.patch timekeeping-use-time_is_before_jiffies-instead-of-open-coding-it.patch net-decnet-use-time_is_before_jiffies-instead-of-open-coding-it.patch