continue;  /* Nothing to do if writing beyond end of snapshot */ if (bio->bi_sector >= dm_table_get_size(snap->table)) 
static int __origin_write(struct list_head *snapshots, struct bio *bio){	int r = 1, first = 1;	struct dm_snapshot *snap;	struct exception *e;	struct pending_exception *pe, *last = NULL;	chunk_t chunk;	/* Do all the snapshots on this origin */	list_for_each_entry (snap, snapshots, list) {		/* Only deal with valid snapshots */		if (!snap->valid)			continue;		down_write(&snap->lock);		/*		 * Remember, different snapshots can have		 * different chunk sizes.		 */		chunk = sector_to_chunk(snap, bio->bi_sector);		/*		 * Check exception table to see if block		 * is already remapped in this snapshot		 * and trigger an exception if not.		 */		e = lookup_exception(&snap->complete, chunk);		if (!e) {			pe = __find_pending_exception(snap, bio);			if (!pe) {				snap->store.drop_snapshot(&snap->store);				snap->valid = 0;			} else {				if (last)					list_merge(&pe->siblings,						   &last->siblings);				last = pe;				r = 0;			}		}		up_write(&snap->lock);	}	/*	 * Now that we have a complete pe list we can start the copying.	 */	if (last) {		pe = last;		do {			down_write(&pe->snap->lock);			if (first)				bio_list_add(&pe->origin_bios, bio);			if (!pe->started) {				pe->started = 1;				up_write(&pe->snap->lock);				start_copy(pe);			} else				up_write(&pe->snap->lock);			first = 0;			pe = list_entry(pe->siblings.next,					struct pending_exception, siblings);		} while (pe != last);	}	return r;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d5e404c10a98fc2979643476851e9cbdb1944812/dm-snap.c/buggy/drivers/md/dm-snap.c