set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(3 * HZ); 
msleep(3000); 
cifs_reconnect(struct TCP_Server_Info *server){	int rc = 0;	struct list_head *tmp;	struct cifsSesInfo *ses;	struct cifsTconInfo *tcon;	struct mid_q_entry * mid_entry;		spin_lock(&GlobalMid_Lock);	if(server->tcpStatus == CifsExiting) {		/* the demux thread will exit normally 		next time through the loop */		spin_unlock(&GlobalMid_Lock);		return rc;	} else		server->tcpStatus = CifsNeedReconnect;	spin_unlock(&GlobalMid_Lock);	server->maxBuf = 0;	cFYI(1, ("Reconnecting tcp session"));	/* before reconnecting the tcp session, mark the smb session (uid)		and the tid bad so they are not used until reconnected */	read_lock(&GlobalSMBSeslock);	list_for_each(tmp, &GlobalSMBSessionList) {		ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList);		if (ses->server) {			if (ses->server == server) {				ses->status = CifsNeedReconnect;				ses->ipc_tid = 0;			}		}		/* else tcp and smb sessions need reconnection */	}	list_for_each(tmp, &GlobalTreeConnectionList) {		tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList);		if((tcon) && (tcon->ses) && (tcon->ses->server == server)) {			tcon->tidStatus = CifsNeedReconnect;		}	}	read_unlock(&GlobalSMBSeslock);	/* do not want to be sending data on a socket we are freeing */	down(&server->tcpSem); 	if(server->ssocket) {		cFYI(1,("State: 0x%x Flags: 0x%lx", server->ssocket->state,			server->ssocket->flags));		server->ssocket->ops->shutdown(server->ssocket,SEND_SHUTDOWN);		cFYI(1,("Post shutdown state: 0x%x Flags: 0x%lx", server->ssocket->state,			server->ssocket->flags));		sock_release(server->ssocket);		server->ssocket = NULL;	}	spin_lock(&GlobalMid_Lock);	list_for_each(tmp, &server->pending_mid_q) {		mid_entry = list_entry(tmp, struct					mid_q_entry,					qhead);		if(mid_entry) {			if(mid_entry->midState == MID_REQUEST_SUBMITTED) {				/* Mark other intransit requests as needing				   retry so we do not immediately mark the				   session bad again (ie after we reconnect				   below) as they timeout too */				mid_entry->midState = MID_RETRY_NEEDED;			}		}	}	spin_unlock(&GlobalMid_Lock);	up(&server->tcpSem); 	while ((server->tcpStatus != CifsExiting) && (server->tcpStatus != CifsGood))	{		if(server->protocolType == IPV6) {			rc = ipv6_connect(&server->addr.sockAddr6,&server->ssocket);		} else {			rc = ipv4_connect(&server->addr.sockAddr, 					&server->ssocket,					server->workstation_RFC1001_name);		}		if(rc) {			set_current_state(TASK_INTERRUPTIBLE);			schedule_timeout(3 * HZ);		} else {			atomic_inc(&tcpSesReconnectCount);			spin_lock(&GlobalMid_Lock);			if(server->tcpStatus != CifsExiting)				server->tcpStatus = CifsGood;			server->sequence_number = 0;			spin_unlock(&GlobalMid_Lock);				/*		atomic_set(&server->inFlight,0);*/			wake_up(&server->response_q);		}	}	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0cb766ae629c70d53040f85de73db0583eadb233/connect.c/clean/fs/cifs/connect.c