diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc index a338f12cc..ef568f6fe 100644 --- a/winsup/cygwin/fhandler_fifo.cc +++ b/winsup/cygwin/fhandler_fifo.cc @@ -906,6 +906,14 @@ errout: int __reg2 fhandler_fifo::fstatvfs (struct statvfs *sfs) { + if (get_flags () & O_PATH) + /* We already have a handle. */ + { + HANDLE h = get_handle (); + if (h) + return fstatvfs_by_handle (h, sfs); + } + fhandler_disk_file fh (pc); fh.get_device () = FH_FS; return fh.fstatvfs (sfs);