mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 16:48:26 +02:00 
			
		
		
		
	fs: remove useless plus one in super_cache_scan()
After commit 475d0db742 ("fs: Fix theoretical division by 0 in
super_cache_scan()."), there's no need to plus one to prevent
division by zero.
Remove it to simplify the code.
Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com>
Link: https://lore.kernel.org/20250428135050.267297-1-alexjlzheng@tencent.com
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
			
			
This commit is contained in:
		
							parent
							
								
									19bbfe7b5f
								
							
						
					
					
						commit
						9f81d70702
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -201,7 +201,7 @@ static unsigned long super_cache_scan(struct shrinker *shrink, | |||
| 
 | ||||
| 	inodes = list_lru_shrink_count(&sb->s_inode_lru, sc); | ||||
| 	dentries = list_lru_shrink_count(&sb->s_dentry_lru, sc); | ||||
| 	total_objects = dentries + inodes + fs_objects + 1; | ||||
| 	total_objects = dentries + inodes + fs_objects; | ||||
| 	if (!total_objects) | ||||
| 		total_objects = 1; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Jinliang Zheng
						Jinliang Zheng