mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	f2fs: drop obsolete node page when it is truncated
If a node page is trucated, we'd better drop the page in the node_inode's page cache for better memory footprint. Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
This commit is contained in:
		
							parent
							
								
									4ef51a8fcc
								
							
						
					
					
						commit
						bf39c00a9a
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -518,6 +518,10 @@ static void truncate_node(struct dnode_of_data *dn)
 | 
			
		|||
	F2FS_SET_SB_DIRT(sbi);
 | 
			
		||||
 | 
			
		||||
	f2fs_put_page(dn->node_page, 1);
 | 
			
		||||
 | 
			
		||||
	invalidate_mapping_pages(NODE_MAPPING(sbi),
 | 
			
		||||
			dn->node_page->index, dn->node_page->index);
 | 
			
		||||
 | 
			
		||||
	dn->node_page = NULL;
 | 
			
		||||
	trace_f2fs_truncate_node(dn->inode, dn->nid, ni.blk_addr);
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue