mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	btrfs: reserve correct number of items for unlink and rmdir
__btrfs_unlink_inode() calls btrfs_update_inode() on the parent directory in order to update its size and sequence number. Make sure we account for it. Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
		
							parent
							
								
									42226c9897
								
							
						
					
					
						commit
						bca4ad7c0b
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -4199,8 +4199,9 @@ static struct btrfs_trans_handle *__unlink_start_trans(struct inode *dir)
 | 
				
			||||||
	 * 1 for the dir index
 | 
						 * 1 for the dir index
 | 
				
			||||||
	 * 1 for the inode ref
 | 
						 * 1 for the inode ref
 | 
				
			||||||
	 * 1 for the inode
 | 
						 * 1 for the inode
 | 
				
			||||||
 | 
						 * 1 for the parent inode
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	return btrfs_start_transaction_fallback_global_rsv(root, 5);
 | 
						return btrfs_start_transaction_fallback_global_rsv(root, 6);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int btrfs_unlink(struct inode *dir, struct dentry *dentry)
 | 
					static int btrfs_unlink(struct inode *dir, struct dentry *dentry)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue