summaryrefslogtreecommitdiff
path: root/fs/bcachefs/thread_with_file.c
diff options
context:
space:
mode:
authorChen Yufan <chenyufan@vivo.com>2024-08-22 10:57:31 +0800
committerKent Overstreet <kent.overstreet@linux.dev>2024-09-09 09:41:49 -0400
commit848c3ff8826b68a587f84f1b00556ab8af651bef (patch)
tree2a0d612b033d7b2a57ddd38a3316dab81ec46840 /fs/bcachefs/thread_with_file.c
parent94932a0842ccebe413cd8205632a537f275c100d (diff)
bcachefs: Convert to use jiffies macros
Use jiffies macros instead of using jiffies directly to handle wraparound. Signed-off-by: Chen Yufan <chenyufan@vivo.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/thread_with_file.c')
-rw-r--r--fs/bcachefs/thread_with_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/thread_with_file.c b/fs/bcachefs/thread_with_file.c
index 0807ce9b171a..fb3442a7c67f 100644
--- a/fs/bcachefs/thread_with_file.c
+++ b/fs/bcachefs/thread_with_file.c
@@ -387,7 +387,7 @@ again:
seen = buf->buf.nr;
char *n = memchr(buf->buf.data, '\n', seen);
- if (!n && timeout != MAX_SCHEDULE_TIMEOUT && jiffies >= until) {
+ if (!n && timeout != MAX_SCHEDULE_TIMEOUT && time_after_eq(jiffies, until)) {
spin_unlock(&buf->lock);
return -ETIME;
}