/* Stop the merging process and wait until it finishes.  */
static void stop_merge(struct dm_snapshot *s)
/* Stop the merging process and wait until it finishes.  */
static void stop_merge(struct dm_snapshot *s)
{
	set_bit(SHUTDOWN_MERGE, &s->state_bits);
	wait_on_bit(&s->state_bits, RUNNING_MERGE, wait_schedule,
		    TASK_UNINTERRUPTIBLE);
	clear_bit(SHUTDOWN_MERGE, &s->state_bits);
}