summaryrefslogtreecommitdiff
path: root/block/bio.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-27 08:24:13 +0300
committerJens Axboe <axboe@kernel.dk>2020-05-27 14:21:23 +0300
commit9123bf6f21b015cce16f3ce066c72aac9fc78d2f (patch)
tree6de6b2f2a239ecaad7993ab01557a0675afcda3c /block/bio.c
parente722fff238bbfe6308d7778a8c2163c181bf998a (diff)
downloadlinux-9123bf6f21b015cce16f3ce066c72aac9fc78d2f.tar.xz
block: move update_io_ticks to blk-core.c
All callers are in blk-core.c, so move update_io_ticks over. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/block/bio.c b/block/bio.c
index 3e89c7b37855..5235da6434aa 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1376,22 +1376,6 @@ defer:
schedule_work(&bio_dirty_work);
}
-void update_io_ticks(struct hd_struct *part, unsigned long now, bool end)
-{
- unsigned long stamp;
-again:
- stamp = READ_ONCE(part->stamp);
- if (unlikely(stamp != now)) {
- if (likely(cmpxchg(&part->stamp, stamp, now) == stamp)) {
- __part_stat_add(part, io_ticks, end ? now - stamp : 1);
- }
- }
- if (part->partno) {
- part = &part_to_disk(part)->part0;
- goto again;
- }
-}
-
static inline bool bio_remaining_done(struct bio *bio)
{
/*