summaryrefslogtreecommitdiffstats
path: root/cmd/zpool
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/zpool')
-rw-r--r--cmd/zpool/zpool_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 6071babfd..0ac8c2a5e 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -1178,7 +1178,7 @@ zpool_do_labelclear(int argc, char **argv)
* fatal when the device does not support BLKFLSBUF as would be the
* case for a file vdev.
*/
- if ((ioctl(fd, BLKFLSBUF) != 0) && (errno != ENOTTY))
+ if ((zfs_dev_flush(fd) != 0) && (errno != ENOTTY))
(void) fprintf(stderr, gettext("failed to invalidate "
"cache for %s: %s\n"), vdev, strerror(errno));