aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux/zfs
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-12-22 13:53:25 -0800
committerBrian Behlendorf <[email protected]>2020-12-27 16:20:40 -0800
commit19697e4545cae70cf6692d19d17821d2f11a1ece (patch)
treed5b3d09778e46c1ab4e1c4215c573dbc266fd954 /module/os/linux/zfs
parent72ba4b2a4ca8c55bc8e8350126de2e9f18e75900 (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/os/linux/zfs')
-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);
}