#endif 
static struct dentry *proc_pident_lookup(struct inode *dir, 					 struct dentry *dentry,					 struct pid_entry *ents){	struct inode *inode;	int error;	struct task_struct *task = proc_task(dir);	struct pid_entry *p;	struct proc_inode *ei;	error = -ENOENT;	inode = NULL;	if (!pid_alive(task))		goto out;	for (p = ents; p->name; p++) {		if (p->len != dentry->d_name.len)			continue;		if (!memcmp(dentry->d_name.name, p->name, p->len))			break;	}	if (!p->name)		goto out;	error = -EINVAL;	inode = proc_pid_make_inode(dir->i_sb, task, p->type);	if (!inode)		goto out;	ei = PROC_I(inode);	inode->i_mode = p->mode;	/*	 * Yes, it does not scale. And it should not. Don't add	 * new entries into /proc/<tgid>/ without very good reasons.	 */	switch(p->type) {		case PROC_TGID_TASK:			inode->i_nlink = 2 + get_tid_list(2, NULL, dir);			inode->i_op = &proc_task_inode_operations;			inode->i_fop = &proc_task_operations;			break;		case PROC_TID_FD:		case PROC_TGID_FD:			inode->i_nlink = 2;			inode->i_op = &proc_fd_inode_operations;			inode->i_fop = &proc_fd_operations;			break;		case PROC_TID_EXE:		case PROC_TGID_EXE:			inode->i_op = &proc_pid_link_inode_operations;			ei->op.proc_get_link = proc_exe_link;			break;		case PROC_TID_CWD:		case PROC_TGID_CWD:			inode->i_op = &proc_pid_link_inode_operations;			ei->op.proc_get_link = proc_cwd_link;			break;		case PROC_TID_ROOT:		case PROC_TGID_ROOT:			inode->i_op = &proc_pid_link_inode_operations;			ei->op.proc_get_link = proc_root_link;			break;		case PROC_TID_ENVIRON:		case PROC_TGID_ENVIRON:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_pid_environ;			break;		case PROC_TID_AUXV:		case PROC_TGID_AUXV:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_pid_auxv;			break;		case PROC_TID_STATUS:		case PROC_TGID_STATUS:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_pid_status;			break;		case PROC_TID_STAT:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_tid_stat;			break;		case PROC_TGID_STAT:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_tgid_stat;			break;		case PROC_TID_CMDLINE:		case PROC_TGID_CMDLINE:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_pid_cmdline;			break;		case PROC_TID_STATM:		case PROC_TGID_STATM:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_pid_statm;			break;		case PROC_TID_MAPS:		case PROC_TGID_MAPS:			inode->i_fop = &proc_maps_operations;			break;#ifdef CONFIG_NUMA		case PROC_TID_NUMA_MAPS:		case PROC_TGID_NUMA_MAPS:			inode->i_fop = &proc_numa_maps_operations;			break;#endif		case PROC_TID_MEM:		case PROC_TGID_MEM:			inode->i_op = &proc_mem_inode_operations;			inode->i_fop = &proc_mem_operations;			break;#ifdef CONFIG_SECCOMP		case PROC_TID_SECCOMP:		case PROC_TGID_SECCOMP:			inode->i_fop = &proc_seccomp_operations;			break;#endif /* CONFIG_SECCOMP */		case PROC_TID_MOUNTS:		case PROC_TGID_MOUNTS:			inode->i_fop = &proc_mounts_operations;			break;		case PROC_TID_SMAPS:		case PROC_TGID_SMAPS:			inode->i_fop = &proc_smaps_operations;			break;#ifdef CONFIG_SECURITY		case PROC_TID_ATTR:			inode->i_nlink = 2;			inode->i_op = &proc_tid_attr_inode_operations;			inode->i_fop = &proc_tid_attr_operations;			break;		case PROC_TGID_ATTR:			inode->i_nlink = 2;			inode->i_op = &proc_tgid_attr_inode_operations;			inode->i_fop = &proc_tgid_attr_operations;			break;		case PROC_TID_ATTR_CURRENT:		case PROC_TGID_ATTR_CURRENT:		case PROC_TID_ATTR_PREV:		case PROC_TGID_ATTR_PREV:		case PROC_TID_ATTR_EXEC:		case PROC_TGID_ATTR_EXEC:		case PROC_TID_ATTR_FSCREATE:		case PROC_TGID_ATTR_FSCREATE:			inode->i_fop = &proc_pid_attr_operations;			break;#endif#ifdef CONFIG_KALLSYMS		case PROC_TID_WCHAN:		case PROC_TGID_WCHAN:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_pid_wchan;			break;#endif#ifdef CONFIG_SCHEDSTATS		case PROC_TID_SCHEDSTAT:		case PROC_TGID_SCHEDSTAT:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_pid_schedstat;			break;#endif#ifdef CONFIG_CPUSETS		case PROC_TID_CPUSET:		case PROC_TGID_CPUSET:			inode->i_fop = &proc_cpuset_operations;			break;#endif		case PROC_TID_OOM_SCORE:		case PROC_TGID_OOM_SCORE:			inode->i_fop = &proc_info_file_operations;			ei->op.proc_read = proc_oom_score;			break;		case PROC_TID_OOM_ADJUST:		case PROC_TGID_OOM_ADJUST:			inode->i_fop = &proc_oom_adjust_operations;			break;#ifdef CONFIG_AUDITSYSCALL		case PROC_TID_LOGINUID:		case PROC_TGID_LOGINUID:			inode->i_fop = &proc_loginuid_operations;			break;#endif		default:			printk("procfs: impossible type (%d)",p->type);			iput(inode);			return ERR_PTR(-EINVAL);	}	dentry->d_op = &pid_dentry_operations;	d_add(dentry, inode);	return NULL;out:	return ERR_PTR(error);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/63c6764ce4c650245a41a95a2235207d25ca4fde/base.c/clean/fs/proc/base.c