java-1.8.0-openjdk/8165852-pr3468.patch

22 lines
936 B
Diff

--- openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java 2017-08-23 11:40:26.690809603 +0200
+++ openjdk/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java 2017-08-23 11:44:28.314815334 +0200
@@ -74,8 +74,16 @@
} catch (UnixException x) {
x.rethrowAsIOException(parent);
}
- if (attrs.dev() != dev())
- break;
+ if (attrs.dev() != dev()) {
+
+ // step 3: lookup mounted file systems (use /proc/mounts to ensure we
+ // find the file system even when not in /etc/mtab)
+ byte[] dir = path.asByteArray();
+ for (UnixMountEntry entry: fs.getMountEntries("/proc/mounts")) {
+ if (Arrays.equals(dir, entry.dir()))
+ return entry;
+ }
+ }
path = parent;
parent = parent.getParent();
}