 spin_lock_irqsave(&bitmap->lock, flags); *ptr = NULL;  if (!bitmap->file) /* no need for daemon if there's no backing file */ goto out_unlock;  spin_unlock_irqrestore(&bitmap->lock, flags); 
static int bitmap_start_daemon(struct bitmap *bitmap, mdk_thread_t **ptr,				void (*func)(mddev_t *), char *name){	mdk_thread_t *daemon;	unsigned long flags;	char namebuf[32];	spin_lock_irqsave(&bitmap->lock, flags);	*ptr = NULL;	if (!bitmap->file) /* no need for daemon if there's no backing file */		goto out_unlock;	spin_unlock_irqrestore(&bitmap->lock, flags);#ifdef INJECT_FATAL_FAULT_2	daemon = NULL;#else	sprintf(namebuf, "%%s_%s", name);	daemon = md_register_thread(func, bitmap->mddev, namebuf);#endif	if (!daemon) {		printk(KERN_ERR "%s: failed to start bitmap daemon\n",			bmname(bitmap));		return -ECHILD;	}	spin_lock_irqsave(&bitmap->lock, flags);	*ptr = daemon;	md_wakeup_thread(daemon); /* start it running */	PRINTK("%s: %s daemon (pid %d) started...\n",		bmname(bitmap), name, daemon->tsk->pid);out_unlock:	spin_unlock_irqrestore(&bitmap->lock, flags);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/500af87abb81098da47474c81f29ea315a056dc5/bitmap.c/buggy/drivers/md/bitmap.c