don't make susp_count negative.
This commit is contained in:
		
							parent
							
								
									b560a36b20
								
							
						
					
					
						commit
						73ee8b8b99
					
				| @ -352,13 +352,15 @@ int count;			/* max number of processes to release */ | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   /* Search the proc table. */ |   /* Search the proc table. */ | ||||||
|   for (rp = &fproc[0]; rp < &fproc[NR_PROCS]; rp++) { |   for (rp = &fproc[0]; rp < &fproc[NR_PROCS] && count > 0; rp++) { | ||||||
| 	if (rp->fp_pid != PID_FREE && rp->fp_suspended == SUSPENDED && | 	if (rp->fp_pid != PID_FREE && rp->fp_suspended == SUSPENDED && | ||||||
| 			rp->fp_revived == NOT_REVIVING && | 			rp->fp_revived == NOT_REVIVING && | ||||||
| 			(rp->fp_fd & BYTE) == call_nr && | 			(rp->fp_fd & BYTE) == call_nr && | ||||||
| 			rp->fp_filp[rp->fp_fd>>8]->filp_vno == vp) { | 			rp->fp_filp[rp->fp_fd>>8]->filp_vno == vp) { | ||||||
| 		revive(rp->fp_endpoint, 0); | 		revive(rp->fp_endpoint, 0); | ||||||
| 		susp_count--;	/* keep track of who is suspended */ | 		susp_count--;	/* keep track of who is suspended */ | ||||||
|  | 		if(susp_count < 0) | ||||||
|  | 			panic("vfs", "susp_count now negative", susp_count); | ||||||
| 		if (--count == 0) return; | 		if (--count == 0) return; | ||||||
| 	} | 	} | ||||||
|   } |   } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ben Gras
						Ben Gras