]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
UBUNTU: hio -- part_round_stats() removed in 5.0
authorSeth Forshee <seth.forshee@canonical.com>
Wed, 6 Feb 2019 21:17:10 +0000 (15:17 -0600)
committerPaolo Pisati <paolo.pisati@canonical.com>
Tue, 2 Nov 2021 07:24:45 +0000 (08:24 +0100)
This can no longer be called. The only place which was still
calling it for 4.14 and later was ssd_update_smart(), and it was
not updating any statistics used there anyhow, so there's no need
to replace the call with anything else.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
ubuntu/hio/hio.c

index 7a1a1f910d55f8d2cceb5d8a2cc89cc3f2d0375c..f5f601802f498fc8568556795ed3c4af44510fe8 100644 (file)
@@ -6121,6 +6121,7 @@ static int ssd_update_smart(struct ssd_device *dev, struct ssd_smart *smart)
        smart->io_stat.run_time += run_time;
 
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0))
        cpu = part_stat_lock();
        part = &dev->gd->part0;
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
@@ -6129,6 +6130,7 @@ static int ssd_update_smart(struct ssd_device *dev, struct ssd_smart *smart)
        part_round_stats(cpu, part);
 #endif
        part_stat_unlock();
+#endif
 
        smart->io_stat.nr_read += part_stat_read(part, ios[READ]);
        smart->io_stat.nr_write += part_stat_read(part, ios[WRITE]);