putname(v9ses->name); 
__putname(v9ses->name); 
v9fs_session_init(struct v9fs_session_info *v9ses,		  const char *dev_name, char *data){	struct v9fs_fcall *fcall = NULL;	struct v9fs_transport *trans_proto;	int n = 0;	int newfid = -1;	int retval = -EINVAL;	v9ses->name = __getname();	if (!v9ses->name)		return -ENOMEM;	v9ses->remotename = __getname();	if (!v9ses->remotename) {		putname(v9ses->name);		return -ENOMEM;	}	strcpy(v9ses->name, V9FS_DEFUSER);	strcpy(v9ses->remotename, V9FS_DEFANAME);	v9fs_parse_options(data, v9ses);	/* set global debug level */	v9fs_debug_level = v9ses->debug;	/* id pools that are session-dependent: FIDs and TIDs */	idr_init(&v9ses->fidpool.pool);	init_MUTEX(&v9ses->fidpool.lock);	idr_init(&v9ses->tidpool.pool);	init_MUTEX(&v9ses->tidpool.lock);	switch (v9ses->proto) {	case PROTO_TCP:		trans_proto = &v9fs_trans_tcp;		break;	case PROTO_UNIX:		trans_proto = &v9fs_trans_unix;		*v9ses->remotename = 0;		break;	case PROTO_FD:		trans_proto = &v9fs_trans_fd;		*v9ses->remotename = 0;		break;	default:		printk(KERN_ERR "v9fs: Bad mount protocol %d\n", v9ses->proto);		retval = -ENOPROTOOPT;		goto SessCleanUp;	};	v9ses->transport = kmalloc(sizeof(*v9ses->transport), GFP_KERNEL);	if (!v9ses->transport) {		retval = -ENOMEM;		goto SessCleanUp;	}	memmove(v9ses->transport, trans_proto, sizeof(*v9ses->transport));	if ((retval = v9ses->transport->init(v9ses, dev_name, data)) < 0) {		eprintk(KERN_ERR, "problem initializing transport\n");		goto SessCleanUp;	}	v9ses->inprogress = 0;	v9ses->shutdown = 0;	v9ses->session_hung = 0;	if ((retval = v9fs_mux_init(v9ses, dev_name)) < 0) {		dprintk(DEBUG_ERROR, "problem initializing mux\n");		goto SessCleanUp;	}	if (v9ses->afid == ~0) {		if (v9ses->extended)			retval =			    v9fs_t_version(v9ses, v9ses->maxdata, "9P2000.u",					   &fcall);		else			retval = v9fs_t_version(v9ses, v9ses->maxdata, "9P2000",						&fcall);		if (retval < 0) {			dprintk(DEBUG_ERROR, "v9fs_t_version failed\n");			goto FreeFcall;		}		/* Really should check for 9P1 and report error */		if (!strcmp(fcall->params.rversion.version, "9P2000.u")) {			dprintk(DEBUG_9P, "9P2000 UNIX extensions enabled\n");			v9ses->extended = 1;		} else {			dprintk(DEBUG_9P, "9P2000 legacy mode enabled\n");			v9ses->extended = 0;		}		n = fcall->params.rversion.msize;		kfree(fcall);		if (n < v9ses->maxdata)			v9ses->maxdata = n;	}	newfid = v9fs_get_idpool(&v9ses->fidpool);	if (newfid < 0) {		eprintk(KERN_WARNING, "couldn't allocate FID\n");		retval = -ENOMEM;		goto SessCleanUp;	}	/* it is a little bit ugly, but we have to prevent newfid */	/* being the same as afid, so if it is, get a new fid     */	if (v9ses->afid != ~0 && newfid == v9ses->afid) {		newfid = v9fs_get_idpool(&v9ses->fidpool);		if (newfid < 0) {			eprintk(KERN_WARNING, "couldn't allocate FID\n");			retval = -ENOMEM;			goto SessCleanUp;		}	}	if ((retval =	     v9fs_t_attach(v9ses, v9ses->name, v9ses->remotename, newfid,			   v9ses->afid, NULL))	    < 0) {		dprintk(DEBUG_ERROR, "cannot attach\n");		goto SessCleanUp;	}	if (v9ses->afid != ~0) {		if (v9fs_t_clunk(v9ses, v9ses->afid, NULL))			dprintk(DEBUG_ERROR, "clunk failed\n");	}	return newfid;      FreeFcall:	kfree(fcall);      SessCleanUp:	v9fs_session_close(v9ses);	return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/ce44eeb6906cf2b093b76ea69b952621712a4a3c/v9fs.c/clean/fs/9p/v9fs.c