/* len <= EXT2_NAME_LEN and de != NULL are guaranteed by caller.  */
static int ext2_match(int len, const char *const name, struct ext2_dir_entry_2 *de)
/* len <= EXT2_NAME_LEN and de != NULL are guaranteed by caller.  */
static int ext2_match(int len, const char *const name, struct ext2_dir_entry_2 *de)
{
	if (len != de->name_len)
		return 0;
	if (!de->inode)
		return 0;
	return !memcmp(name, de->name, len);
}