/* The inode lookup table is used only by the export code, inode disk locations are directly encoded in directories, enabling direct access without an intermediate lookup for all operations except the export ops. Look-up inode number (ino) in table, returning the inode location.  */
static long long squashfs_inode_lookup(struct super_block *sb, int ino_num)
/* The inode lookup table is used only by the export code, inode disk locations are directly encoded in directories, enabling direct access without an intermediate lookup for all operations except the export ops. Look-up inode number (ino) in table, returning the inode location.  */
static long long squashfs_inode_lookup(struct super_block *sb, int ino_num)
{
	struct squashfs_sb_info *msblk = sb->s_fs_info;
	int blk = SQUASHFS_LOOKUP_BLOCK(ino_num - 1);
	int offset = SQUASHFS_LOOKUP_BLOCK_OFFSET(ino_num - 1);
	u64 start = le64_to_cpu(msblk->inode_lookup_table[blk]);
	__le64 ino;
	int err;
	TRACE("Entered squashfs_inode_lookup, inode_number = %d\n", ino_num);
	err = squashfs_read_metadata(sb, &ino, &start, &offset, sizeof(ino));
	if (err < 0)
		return err;
	TRACE("squashfs_inode_lookup, inode = 0x%llx\n",
		(u64) le64_to_cpu(ino));
	return le64_to_cpu(ino);
}