UBIFS: fix shrinker object count reports
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 31 May 2011 04:03:21 +0000 (07:03 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 3 Jun 2011 15:12:24 +0000 (18:12 +0300)
commitcf610bf4199770420629d3bc273494bd27ad6c1d
tree76418cad3b35d8b40090ae13d5100de598e6c4cb
parentda8b94ea61c5d80aae0cc7b7541f1e0fa7459391
UBIFS: fix shrinker object count reports

Sometimes VM asks the shrinker to return amount of objects it can shrink,
and we return the ubifs_clean_zn_cnt in that case. However, it is possible
that this counter is negative for a short period of time, due to the way
UBIFS TNC code updates it. And I can observe the following warnings sometimes:

shrink_slab: ubifs_shrinker+0x0/0x2b7 [ubifs] negative objects to delete nr=-8541616642706119788

This patch makes sure UBIFS never returns negative count of objects.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: stable@kernel.org
fs/ubifs/shrinker.c
This page took 0.033635 seconds and 5 git commands to generate.