author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> 2014-05-17 20:56:38 +0900
committer: Al Viro <viro@zeniv.linux.org.uk> 2014-10-09 02:39:02 -0400
commit: 475d0db742e3755c6b267f48577ff7cbb7dfda0d
parent: b8314f9303a985354f445763960c0db2d7948891
Commit Summary:
Diffstat:
1 file 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,
inodes = list_lru_count_node(&sb->s_inode_lru, sc->nid);
dentries = list_lru_count_node(&sb->s_dentry_lru, sc->nid);
total_objects = dentries + inodes + fs_objects + 1;
+ if (!total_objects)
+ total_objects = 1;
/* proportion the scan between the caches */
dentries = mult_frac(sc->nr_to_scan, dentries, total_objects);