/* Traverse all shares for a given file, and delete those owned by the given (type of) host  */
void nlmsvc_traverse_shares(struct nlm_host *host, struct nlm_file *file, nlm_host_match_fn_t match)
/* Traverse all shares for a given file, and delete those owned by the given (type of) host  */
void nlmsvc_traverse_shares(struct nlm_host *host, struct nlm_file *file, nlm_host_match_fn_t match)
{
	struct nlm_share	*share, **shpp;
	shpp = &file->f_shares;
	while ((share = *shpp) !=  NULL) {
		if (match(share->s_host, host)) {
			*shpp = share->s_next;
			kfree(share);
			continue;
		}
		shpp = &share->s_next;
	}
}