diff --git a/clients/src/main/java/org/apache/kafka/common/utils/Utils.java b/clients/src/main/java/org/apache/kafka/common/utils/Utils.java index 0685d1d49b76a..861fa2b97e840 100755 --- a/clients/src/main/java/org/apache/kafka/common/utils/Utils.java +++ b/clients/src/main/java/org/apache/kafka/common/utils/Utils.java @@ -954,7 +954,7 @@ public static void atomicMoveWithFallback(Path source, Path target, boolean need * @throws IOException if flushing the directory fails. */ public static void flushDir(Path path) throws IOException { - if (path != null && !OperatingSystem.IS_WINDOWS) { + if (path != null && !OperatingSystem.IS_WINDOWS && !OperatingSystem.IS_ZOS) { try (FileChannel dir = FileChannel.open(path, StandardOpenOption.READ)) { dir.force(true); }