bitmap->writes_pending == 0, bitmap->write_lock, 
list_empty(&bitmap->complete_pages), bitmap->write_lock, 
int bitmap_unplug(struct bitmap *bitmap){	unsigned long i, attr, flags;	struct page *page;	int wait = 0;	if (!bitmap)		return 0;	/* look at each page to see if there are any set bits that need to be	 * flushed out to disk */	for (i = 0; i < bitmap->file_pages; i++) {		spin_lock_irqsave(&bitmap->lock, flags);		if (!bitmap->file || !bitmap->filemap) {			spin_unlock_irqrestore(&bitmap->lock, flags);			return 0;		}		page = bitmap->filemap[i];		attr = get_page_attr(bitmap, page);		clear_page_attr(bitmap, page, BITMAP_PAGE_DIRTY);		clear_page_attr(bitmap, page, BITMAP_PAGE_NEEDWRITE);		if ((attr & BITMAP_PAGE_DIRTY))			wait = 1;		spin_unlock_irqrestore(&bitmap->lock, flags);		if (attr & (BITMAP_PAGE_DIRTY | BITMAP_PAGE_NEEDWRITE))			if (write_page(page, 0))				return 1;	}	if (wait) { /* if any writes were performed, we need to wait on them */		spin_lock_irq(&bitmap->write_lock);		wait_event_lock_irq(bitmap->write_wait,			bitmap->writes_pending == 0, bitmap->write_lock,			wake_up_process(bitmap->writeback_daemon->tsk));		spin_unlock_irq(&bitmap->write_lock);	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/77ad4bc706fe6c52ab953f31c287a6af712d080c/bitmap.c/buggy/drivers/md/bitmap.c