if (!atomic_read(&mddev->writes_pending)) { mddev_lock_uninterruptible(mddev); if (mddev->in_sync) { mddev->in_sync = 0; del_timer(&mddev->safemode_timer); md_update_sb(mddev); } atomic_inc(&mddev->writes_pending); mddev_unlock(mddev); } else atomic_inc(&mddev->writes_pending); 
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; 
void md_write_start(mddev_t *mddev){	if (!atomic_read(&mddev->writes_pending)) {		mddev_lock_uninterruptible(mddev);		if (mddev->in_sync) {			mddev->in_sync = 0; 			del_timer(&mddev->safemode_timer);			md_update_sb(mddev);		}		atomic_inc(&mddev->writes_pending);		mddev_unlock(mddev);	} else		atomic_inc(&mddev->writes_pending);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/06d91a5fe0b50c9060e70bdf7786f8a3c66249db/md.c/clean/drivers/md/md.c