GridGgfsFileInfo parentInfo = locks.get(parentId);
// Ensure parent is still in place.
if (parentInfo != null) {
Map<String, GridGgfsListingEntry> newListing =
new HashMap<>(parentInfo.listing().size(), 1.0f);
newListing.putAll(parentInfo.listing());
// Remove child entries if possible.
for (Map.Entry<String, GridGgfsListingEntry> entry : listing.entrySet()) {