From: Eric Biggers Date: Sun, 7 Jan 2018 21:35:20 +0000 (-0500) Subject: mbcache: revert "fs/mbcache.c: make count_objects() more robust" X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bbe45d2460da98785cb9453fb0b42d9b2e79dd99;p=linux.git mbcache: revert "fs/mbcache.c: make count_objects() more robust" This reverts commit d5dabd633922ac5ee5bcc67748f7defb8b211469. This patch did absolutely nothing, because ->c_entry_count is unsigned. In addition if there is a bug in how mbcache maintains its entry count, it needs to be fixed, not just hacked around. (There is no obvious bug, though.) Cc: Jan Kara Cc: Jiang Biao Signed-off-by: Eric Biggers Signed-off-by: Theodore Ts'o --- diff --git a/fs/mbcache.c b/fs/mbcache.c index 46b23bb432fee..49c5b25bfa8cb 100644 --- a/fs/mbcache.c +++ b/fs/mbcache.c @@ -270,9 +270,6 @@ static unsigned long mb_cache_count(struct shrinker *shrink, struct mb_cache *cache = container_of(shrink, struct mb_cache, c_shrink); - /* Unlikely, but not impossible */ - if (unlikely(cache->c_entry_count < 0)) - return 0; return cache->c_entry_count; }