VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Chunguang Xu <brookxu@tencent.com> 2021-07-06 05:47:26 +0800 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-20 16:00:27 +0200 commit: 73a14f65a67c093771a3180f523f8b11e729417f parent: 21a06a244d2576f93cbc9ce9bf95814c2810c36a
Commit Summary:
block: fix the problem of io_ticks becoming smaller
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/block/blk-core.c b/block/blk-core.c
index 9bcdae93f6d4..ce0125efbaa7 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1253,7 +1253,7 @@ static void update_io_ticks(struct block_device *part, unsigned long now,
 	unsigned long stamp;
 again:
 	stamp = READ_ONCE(part->bd_stamp);
-	if (unlikely(stamp != now)) {
+	if (unlikely(time_after(now, stamp))) {
 		if (likely(cmpxchg(&part->bd_stamp, stamp, now) == stamp))
 			__part_stat_add(part, io_ticks, end ? now - stamp : 1);
 	}