bio_list_add(&mddev->write_list, bi);  if (mddev->in_sync) { mddev->in_sync = 0; mddev->sb_dirty = 1; } spin_unlock(&mddev->write_lock); md_wakeup_thread(mddev->thread); return 0; 
wait_event(mddev->sb_wait, mddev->sb_dirty==0); 
int md_write_start(mddev_t *mddev, struct bio *bi){	if (bio_data_dir(bi) != WRITE)		return 1;	atomic_inc(&mddev->writes_pending);	spin_lock(&mddev->write_lock);	if (mddev->in_sync == 0 && mddev->sb_dirty == 0) {		spin_unlock(&mddev->write_lock);		return 1;	}	bio_list_add(&mddev->write_list, bi);	if (mddev->in_sync) {		mddev->in_sync = 0;		mddev->sb_dirty = 1;	}	spin_unlock(&mddev->write_lock);	md_wakeup_thread(mddev->thread);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3d310eb7b3df1252e8595d059d982b0a9825a137/md.c/buggy/drivers/md/md.c