procfs: only initialize the first time procfs is mounte
This commit is contained in:
		
							parent
							
								
									0908191386
								
							
						
					
					
						commit
						344c18cf73
					
				@ -54,11 +54,16 @@ PRIVATE void init_hook(void)
 | 
			
		||||
{
 | 
			
		||||
	/* Initialization hook. Generate the static part of the tree.
 | 
			
		||||
	 */
 | 
			
		||||
	static int first_time = 1;
 | 
			
		||||
	struct inode *root;
 | 
			
		||||
 | 
			
		||||
	if (first_time) {
 | 
			
		||||
		root = get_root_inode();
 | 
			
		||||
 | 
			
		||||
		construct_tree(root, root_files);
 | 
			
		||||
 | 
			
		||||
		first_time = 0;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*===========================================================================*
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user