Skip to content

Commit 1c0bbd5

Browse files
authored
Linux 5.10 compat: also zvol_revalidate_disk()
Commit 59b6872 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 <[email protected]> Signed-off-by: Michael D Labriola <[email protected]> Closes #11358
1 parent 77f09e2 commit 1c0bbd5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

module/os/linux/zfs/zvol_os.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,12 @@ zvol_revalidate_disk(struct gendisk *disk)
644644
static int
645645
zvol_update_volsize(zvol_state_t *zv, uint64_t volsize)
646646
{
647+
struct gendisk *disk = zv->zv_zso->zvo_disk;
647648

648649
#ifdef HAVE_REVALIDATE_DISK_SIZE
649-
revalidate_disk_size(zv->zv_zso->zvo_disk, false);
650+
revalidate_disk_size(disk, zvol_revalidate_disk(disk) == 0);
650651
#else
651-
revalidate_disk(zv->zv_zso->zvo_disk);
652+
revalidate_disk(disk);
652653
#endif
653654
return (0);
654655
}

0 commit comments

Comments
 (0)