 /* find debug log and view */ debug_info = debug_area_first; while(debug_info != NULL){ for (i = 0; i < DEBUG_MAX_VIEWS; i++) { if (!debug_info->views[i]) continue; else if (debug_info->debugfs_entries[i] == file->f_dentry) { goto found;	/* found view ! */ } 
debug_info = (struct debug_info*)file->f_dentry->d_inode->u.generic_ip; /* find debug view */ for (i = 0; i < DEBUG_MAX_VIEWS; i++) { if (!debug_info->views[i]) continue; else if (debug_info->debugfs_entries[i] == file->f_dentry) { goto found;	/* found view ! */ 
debug_open(struct inode *inode, struct file *file){	int i = 0, rc = 0;	file_private_info_t *p_info;	debug_info_t *debug_info, *debug_info_snapshot;	down(&debug_lock);	/* find debug log and view */	debug_info = debug_area_first;	while(debug_info != NULL){		for (i = 0; i < DEBUG_MAX_VIEWS; i++) {			if (!debug_info->views[i])				continue;			else if (debug_info->debugfs_entries[i] ==				 file->f_dentry) {				goto found;	/* found view ! */			}		}		debug_info = debug_info->next;	}	/* no entry found */	rc = -EINVAL;	goto out;found:	/* Make snapshot of current debug areas to get it consistent.     */	/* To copy all the areas is only needed, if we have a view which  */	/* formats the debug areas. */	if(!debug_info->views[i]->format_proc &&		!debug_info->views[i]->header_proc){		debug_info_snapshot = debug_info_copy(debug_info, NO_AREAS);	} else {		debug_info_snapshot = debug_info_copy(debug_info, ALL_AREAS);	}	if(!debug_info_snapshot){		rc = -ENOMEM;		goto out;	}	p_info = (file_private_info_t *) kmalloc(sizeof(file_private_info_t),						GFP_KERNEL);	if(!p_info){		if(debug_info_snapshot)			debug_info_free(debug_info_snapshot);		rc = -ENOMEM;		goto out;	}	p_info->offset = 0;	p_info->debug_info_snap = debug_info_snapshot;	p_info->debug_info_org  = debug_info;	p_info->view = debug_info->views[i];	p_info->act_area = 0;	p_info->act_page = 0;	p_info->act_entry = DEBUG_PROLOG_ENTRY;	p_info->act_entry_offset = 0;	file->private_data = p_info;	debug_info_get(debug_info);out:	up(&debug_lock);	return rc;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/942eaabd5d77522223a311ed9bddaaa3cefde27d/debug.c/buggy/arch/s390/kernel/debug.c