/* name->name holds ptr to start of block. name->len holds size of block.  */
static int gfs2_dirent_last(const struct gfs2_dirent *dent, const struct qstr *name, void *opaque)
/* name->name holds ptr to start of block. name->len holds size of block.  */
static int gfs2_dirent_last(const struct gfs2_dirent *dent, const struct qstr *name, void *opaque)
{
	const char *start = name->name;
	const char *end = (const char *)dent + be16_to_cpu(dent->de_rec_len);
	if (name->len == (end - start))
		return 1;
	return 0;
}