summaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
Diffstat (limited to 'module/os')
-rw-r--r--module/os/linux/zfs/zvol_os.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c
index 62fe6cd7f..3b1d3e4f8 100644
--- a/module/os/linux/zfs/zvol_os.c
+++ b/module/os/linux/zfs/zvol_os.c
@@ -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);
}