Linux 5.10 compat: also zvol_revalidate_disk()

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
This commit is contained in:
Michael D Labriola 2020-12-18 12:36:19 -05:00 committed by Brian Behlendorf
parent 401ba57ccd
commit 7a7e101437

View 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);
}