From: Dan Carpenter Date: Thu, 27 Jun 2013 23:52:19 +0000 (+1000) Subject: UBIFS: signedness bug in ubifs_shrink_count() X-Git-Tag: next-20130628~3^2~402 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8dcfc9308c2f18635c245c6a9a511822e25b717a;p=karo-tx-linux.git UBIFS: signedness bug in ubifs_shrink_count() We test "clean_zn_cnt" for negative later in the function. Signed-off-by: Dan Carpenter Cc: Dave Chinner Cc: Glauber Costa Signed-off-by: Andrew Morton --- diff --git a/fs/ubifs/shrinker.c b/fs/ubifs/shrinker.c index 68ce39965f0f..f35135e28e96 100644 --- a/fs/ubifs/shrinker.c +++ b/fs/ubifs/shrinker.c @@ -280,7 +280,7 @@ static int kick_a_thread(void) unsigned long ubifs_shrink_count(struct shrinker *shrink, struct shrink_control *sc) { - unsigned long clean_zn_cnt = atomic_long_read(&ubifs_clean_zn_cnt); + long clean_zn_cnt = atomic_long_read(&ubifs_clean_zn_cnt); /* * Due to the way UBIFS updates the clean znode counter it may