diff --git a/monitor/fds.c b/monitor/fds.c index ffe206a968..f9465ce53f 100644 --- a/monitor/fds.c +++ b/monitor/fds.c @@ -412,6 +412,12 @@ static bool monitor_fdset_flags_match(int flags, int fd_flags) if ((flags & O_ACCMODE) == (fd_flags & O_ACCMODE)) { match = true; + +#ifdef O_DIRECT + if ((flags & O_DIRECT) != (fd_flags & O_DIRECT)) { + match = false; + } +#endif } return match;