spin_lock_irqsave(&bitmap->lock, flags); daemon = *ptr; *ptr = NULL; spin_unlock_irqrestore(&bitmap->lock, flags); if (daemon) md_unregister_thread(daemon); /* destroy the thread */ 
spin_lock_irqsave(&bitmap->lock, flags); daemon = bitmap->writeback_daemon; bitmap->writeback_daemon = NULL; spin_unlock_irqrestore(&bitmap->lock, flags); if (daemon && ! IS_ERR(daemon)) md_unregister_thread(daemon); /* destroy the thread */ } 
static void bitmap_stop_daemon(struct bitmap *bitmap, mdk_thread_t **ptr){	mdk_thread_t *daemon;	unsigned long flags;	spin_lock_irqsave(&bitmap->lock, flags);	daemon = *ptr;	*ptr = NULL;	spin_unlock_irqrestore(&bitmap->lock, flags);	if (daemon)		md_unregister_thread(daemon); /* destroy the thread */}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/500af87abb81098da47474c81f29ea315a056dc5/bitmap.c/buggy/drivers/md/bitmap.c