mbcache: revert "fs/mbcache.c: make count_objects() more robust"
authorEric Biggers <ebiggers@google.com>
Sun, 7 Jan 2018 21:35:20 +0000 (16:35 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 7 Jan 2018 21:35:20 +0000 (16:35 -0500)
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 <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>
fs/mbcache.c

index 46b23bb..49c5b25 100644 (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;
 }