diff options
-rw-r--r-- | fs/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/super.c b/fs/super.c index b9a214d2fe98..6f8c954315c0 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -80,6 +80,8 @@ static unsigned long super_cache_scan(struct shrinker *shrink, | |||
80 | inodes = list_lru_count_node(&sb->s_inode_lru, sc->nid); | 80 | inodes = list_lru_count_node(&sb->s_inode_lru, sc->nid); |
81 | dentries = list_lru_count_node(&sb->s_dentry_lru, sc->nid); | 81 | dentries = list_lru_count_node(&sb->s_dentry_lru, sc->nid); |
82 | total_objects = dentries + inodes + fs_objects + 1; | 82 | total_objects = dentries + inodes + fs_objects + 1; |
83 | if (!total_objects) | ||
84 | total_objects = 1; | ||
83 | 85 | ||
84 | /* proportion the scan between the caches */ | 86 | /* proportion the scan between the caches */ |
85 | dentries = mult_frac(sc->nr_to_scan, dentries, total_objects); | 87 | dentries = mult_frac(sc->nr_to_scan, dentries, total_objects); |