/* Fail or reinstate all paths that match the provided struct dm_dev.  */
static int action_dev(struct multipath *m, struct dm_dev *dev, action_fn action)
/* Fail or reinstate all paths that match the provided struct dm_dev.  */
static int action_dev(struct multipath *m, struct dm_dev *dev, action_fn action)
{
	int r = 0;
	struct pgpath *pgpath;
	struct priority_group *pg;
	list_for_each_entry(pg, &m->priority_groups, list) {
		list_for_each_entry(pgpath, &pg->pgpaths, list) {
			if (pgpath->path.dev == dev)
				r = action(pgpath);
		}
	}
	return r;
}