@@ -208,7 +208,7 @@ static inline void platform_mntent_close(struct mntent_cursor * cursor)
#if defined(FALLOC_FL_ZERO_RANGE)
static inline int
-platform_zero_range(
+zero_range(
int fd,
xfs_off_t start,
size_t len)
@@ -220,8 +220,18 @@ platform_zero_range(
return 0;
return -errno;
}
+
+static inline int
+platform_zero_range(
+ int fd,
+ xfs_off_t start,
+ size_t len)
+{
+ return zero_range(fd, start, len);
+}
#else
-#define platform_zero_range(fd, s, l) (-EOPNOTSUPP)
+#define zero_range(fd, s, l) (-EOPNOTSUPP)
+#define platform_zero_range(fs, s, l) zero_range(fd, s, l)
#endif
/*
@@ -73,7 +73,7 @@ libxfs_device_zero(struct xfs_buftarg *btp, xfs_daddr_t start, uint len)
/* try to use special zeroing methods, fall back to writes if needed */
len_bytes = LIBXFS_BBTOOFF64(len);
- error = platform_zero_range(fd, start_offset, len_bytes);
+ error = zero_range(fd, start_offset, len_bytes);
if (!error) {
xfs_buftarg_trip_write(btp);
return 0;