summaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
authorMichael D Labriola <[email protected]>2020-12-18 12:36:19 -0500
committerGitHub <[email protected]>2020-12-18 09:36:19 -0800
commit1c0bbd52c3cd6860d6b20a82c5fe482c6bf2e6d4 (patch)
tree9c6a73e593e990ac83f895ac3ec3d88bcb0200cd /module/os
parent77f09e29322817d69cc58a5442fe94ca104b91cd (diff)
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 <[email protected]> Signed-off-by: Michael D Labriola <[email protected]> Closes #11358
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);
}