aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-12-22 13:53:25 -0800
committerBrian Behlendorf <[email protected]>2021-01-05 10:26:32 -0800
commita2621753b2f17aec14fbcab63cfda872c0c0b5ea (patch)
tree54a7f832303a09448bcbb47ca934fe6e83bde936 /module
parente888f2898895ba143046c0247d2e152fa60ce686 (diff)
Linux 5.11 compat: revalidate_disk_size()
Both revalidate_disk_size() and revalidate_disk() have been removed. Functionally this isn't a problem because we only relied on these functions to call zvol_revalidate_disk() for us and to perform any additional handling which might be needed for that kernel version. When neither are available we know there's no additional handling needed and we can directly call zvol_revalidate_disk(). Reviewed-by: Rafael Kitover <[email protected]> Reviewed-by: Coleman Kane <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11387 Closes #11390
Diffstat (limited to 'module')
-rw-r--r--module/os/linux/zfs/zvol_os.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c
index 9a9a721ce..6f5ef12e7 100644
--- a/module/os/linux/zfs/zvol_os.c
+++ b/module/os/linux/zfs/zvol_os.c
@@ -658,10 +658,12 @@ zvol_update_volsize(zvol_state_t *zv, uint64_t volsize)
{
struct gendisk *disk = zv->zv_zso->zvo_disk;
-#ifdef HAVE_REVALIDATE_DISK_SIZE
+#if defined(HAVE_REVALIDATE_DISK_SIZE)
revalidate_disk_size(disk, zvol_revalidate_disk(disk) == 0);
-#else
+#elif defined(HAVE_REVALIDATE_DISK)
revalidate_disk(disk);
+#else
+ zvol_revalidate_disk(disk);
#endif
return (0);
}