/* Called on a write from the origin driver.  */
static int do_origin(struct dm_dev *origin, struct bio *bio)
/* Called on a write from the origin driver.  */
static int do_origin(struct dm_dev *origin, struct bio *bio)
{
	struct origin *o;
	int r = DM_MAPIO_REMAPPED;
	down_read(&_origins_lock);
	o = __lookup_origin(origin->bdev);
	if (o)
		r = __origin_write(&o->snapshots, bio->bi_sector, bio);
	up_read(&_origins_lock);
	return r;
}