8165852: (fs) Mount point not found for a file which is present in overlayfs

Check /proc/mounts when the device ID boundary is reached

Reviewed-by: alanb
This commit is contained in:
Brian Burkhalter 2018-01-12 11:06:22 -08:00
parent 989b326949
commit 473e36a9f3
2 changed files with 18 additions and 9 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -75,7 +75,7 @@ class LinuxFileSystem extends UnixFileSystem {
/**
* Returns object to iterate over the mount entries in the given fstab file.
*/
Iterable<UnixMountEntry> getMountEntries(String fstab) {
List<UnixMountEntry> getMountEntries(String fstab) {
ArrayList<UnixMountEntry> entries = new ArrayList<>();
try {
long fp = setmntent(Util.toBytes(fstab), Util.toBytes("r"));
@ -101,7 +101,7 @@ class LinuxFileSystem extends UnixFileSystem {
* Returns object to iterate over the mount entries in /etc/mtab
*/
@Override
Iterable<UnixMountEntry> getMountEntries() {
List<UnixMountEntry> getMountEntries() {
return getMountEntries("/etc/mtab");
}