]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Linux 5.10 compat: also zvol_revalidate_disk()
authorMichael D Labriola <michael.d.labriola@gmail.com>
Fri, 18 Dec 2020 17:36:19 +0000 (12:36 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 23 Dec 2020 22:35:47 +0000 (14:35 -0800)
Commit 59b68723 added a configure check for 5.10, which removed
revalidate_disk(), and conditionally replaced it's usage with a call to
the new revalidate_disk_size() function.  However, the old function also
invoked the device's registered callback, in our case
zvol_revalidate_disk().  This commit adds a call to zvol_revalidate_disk()
in zvol_update_volsize() to make sure the code path stays the same.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Michael D Labriola <michael.d.labriola@gmail.com>
Closes #11358

module/os/linux/zfs/zvol_os.c

index 62fe6cd7fa1886a6cf7ba23263a27c348608ee0a..3b1d3e4f80dc62205e77d211fa6b48a681d23883 100644 (file)
@@ -644,11 +644,12 @@ zvol_revalidate_disk(struct gendisk *disk)
 static int
 zvol_update_volsize(zvol_state_t *zv, uint64_t volsize)
 {
+       struct gendisk *disk = zv->zv_zso->zvo_disk;
 
 #ifdef HAVE_REVALIDATE_DISK_SIZE
-       revalidate_disk_size(zv->zv_zso->zvo_disk, false);
+       revalidate_disk_size(disk, zvol_revalidate_disk(disk) == 0);
 #else
-       revalidate_disk(zv->zv_zso->zvo_disk);
+       revalidate_disk(disk);
 #endif
        return (0);
 }