public void buildRelationships(TaskMonitor monitor) throws CancelledException {

		// Work backwards (last inode is root) and skip the first inode
		for (int i = inodes.length - 1; i > 0; i--) {

			// Check if the user cancelled the load
			monitor.checkCancelled();

			SquashInode currentInode = inodes[i];

			// Only directory inodes have parent/child relationships
			if (currentInode.isDir()) {
				SquashBasicDirectoryInode dirInode = (SquashBasicDirectoryInode) currentInode;

				// Check if the parent of the current node is the root node
				if (!dirInode.isParentRoot()) {
					dirInode.setParent(inodes[dirInode.getParentInodeNumber()]);
				}
			}
		}
	}
Build the parent/child relationships between inodes
@param monitor Monitor to allow the user to cancel the load
@throws CancelledException Archive load was cancelled
Ghidra/Features/FileFormats/src/main/java/ghidra/file/formats/squashfs/SquashInodeTable.java