|
@@ -80,6 +80,8 @@ static unsigned long super_cache_scan(struct shrinker *shrink,
|
|
inodes = list_lru_count_node(&sb->s_inode_lru, sc->nid);
|
|
inodes = list_lru_count_node(&sb->s_inode_lru, sc->nid);
|
|
dentries = list_lru_count_node(&sb->s_dentry_lru, sc->nid);
|
|
dentries = list_lru_count_node(&sb->s_dentry_lru, sc->nid);
|
|
total_objects = dentries + inodes + fs_objects + 1;
|
|
total_objects = dentries + inodes + fs_objects + 1;
|
|
|
|
+ if (!total_objects)
|
|
|
|
+ total_objects = 1;
|
|
|
|
|
|
/* proportion the scan between the caches */
|
|
/* proportion the scan between the caches */
|
|
dentries = mult_frac(sc->nr_to_scan, dentries, total_objects);
|
|
dentries = mult_frac(sc->nr_to_scan, dentries, total_objects);
|