1
0
Fork 0

mbcache: revert "fs/mbcache.c: make count_objects() more robust"

This reverts commit d5dabd6339.

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 <jack@suse.cz>
Cc: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
hifive-unleashed-5.1
Eric Biggers 2018-01-07 16:35:20 -05:00 committed by Theodore Ts'o
parent 3876bbe27d
commit bbe45d2460
1 changed files with 0 additions and 3 deletions

View File

@ -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;
}