add patch pass-detailed-error-code-from-dax_iomap_fault
[ext4-patch-queue.git] / revert-mbcache-make-count_objects-more-robust
blobe2109db99f8f15616bcd9183b338d6feadd08376
1 mbcache: revert "fs/mbcache.c: make count_objects() more robust"
3 From: Eric Biggers <ebiggers@google.com>
5 This reverts commit d5dabd633922ac5ee5bcc67748f7defb8b211469.
7 This patch did absolutely nothing, because ->c_entry_count is unsigned.
9 In addition if there is a bug in how mbcache maintains its entry count,
10 it needs to be fixed, not just hacked around.  (There is no obvious bug,
11 though.)
13 Cc: Jan Kara <jack@suse.cz>
14 Cc: Jiang Biao <jiang.biao2@zte.com.cn>
15 Signed-off-by: Eric Biggers <ebiggers@google.com>
16 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
17 ---
18  fs/mbcache.c | 3 ---
19  1 file changed, 3 deletions(-)
21 diff --git a/fs/mbcache.c b/fs/mbcache.c
22 index b8b8b9ced9f8..d818fd236787 100644
23 --- a/fs/mbcache.c
24 +++ b/fs/mbcache.c
25 @@ -269,9 +269,6 @@ static unsigned long mb_cache_count(struct shrinker *shrink,
26         struct mb_cache *cache = container_of(shrink, struct mb_cache,
27                                               c_shrink);
29 -       /* Unlikely, but not impossible */
30 -       if (unlikely(cache->c_entry_count < 0))
31 -               return 0;
32         return cache->c_entry_count;
33  }
35 -- 
36 2.15.1