*bmc |= RESYNC_MASK; *bmc &= ~NEEDED_MASK; 
if (!degraded) { /* don't set/clear bits if degraded */ *bmc |= RESYNC_MASK; *bmc &= ~NEEDED_MASK; } 
int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, int *blocks){	bitmap_counter_t *bmc;	int rv;	if (bitmap == NULL) {/* FIXME or bitmap set as 'failed' */		*blocks = 1024;		return 1; /* always resync if no bitmap */	}	spin_lock_irq(&bitmap->lock);	bmc = bitmap_get_counter(bitmap, offset, blocks, 0);	rv = 0;	if (bmc) {		/* locked */		if (RESYNC(*bmc))			rv = 1;		else if (NEEDED(*bmc)) {			rv = 1;			*bmc |= RESYNC_MASK;			*bmc &= ~NEEDED_MASK;		}	}	spin_unlock_irq(&bitmap->lock);	return rv;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6a806c510de490318846b53bbfec463d02ca274b/bitmap.c/buggy/drivers/md/bitmap.c