/* This is used when a search for a new attribute is being started to reset the search context to the beginning.  */
void ntfs_attr_reinit_search_ctx(ntfs_attr_search_ctx *ctx)
/* This is used when a search for a new attribute is being started to reset the search context to the beginning.  */
void ntfs_attr_reinit_search_ctx(ntfs_attr_search_ctx *ctx)
{
	if (likely(!ctx->base_ntfs_ino)) {
		ctx->is_first = true;
		ctx->attr = (ATTR_RECORD*)((u8*)ctx->mrec +
				le16_to_cpu(ctx->mrec->attrs_offset));
		ctx->al_entry = NULL;
		return;
	}
	if (ctx->ntfs_ino != ctx->base_ntfs_ino)
		unmap_extent_mft_record(ctx->ntfs_ino);
	ntfs_attr_init_search_ctx(ctx, ctx->base_ntfs_ino, ctx->base_mrec);
	return;
}