comments
This commit is contained in:
		
							parent
							
								
									2c56547272
								
							
						
					
					
						commit
						12eeefc72d
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		
							
								
								
									
										2
									
								
								bio.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								bio.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -56,7 +56,7 @@ binit(void)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
// Look through buffer cache for sector on device dev.
 | 
			
		||||
// If not found, allocate fresh block.
 | 
			
		||||
// If not found, allocate a buffer.
 | 
			
		||||
// In either case, return B_BUSY buffer.
 | 
			
		||||
static struct buf*
 | 
			
		||||
bget(uint dev, uint sector)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										2
									
								
								fs.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								fs.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -321,7 +321,7 @@ iput(struct inode *ip)
 | 
			
		|||
{
 | 
			
		||||
  acquire(&icache.lock);
 | 
			
		||||
  if(ip->ref == 1 && (ip->flags & I_VALID) && ip->nlink == 0){
 | 
			
		||||
    // inode has no links: truncate and free inode.
 | 
			
		||||
    // inode has no links and no other references: truncate and free inode.
 | 
			
		||||
    if(ip->flags & I_BUSY)
 | 
			
		||||
      panic("iput busy");
 | 
			
		||||
    ip->flags |= I_BUSY;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue