Commit bbe45d24 authored by Eric Biggers's avatar Eric Biggers Committed by Theodore Ts'o
Browse files

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



This reverts commit d5dabd63.

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: default avatarEric Biggers <ebiggers@google.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 3876bbe2
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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;
}