]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
UBIFS: signedness bug in ubifs_shrink_count()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 19 Jun 2013 00:06:51 +0000 (10:06 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:48 +0000 (17:26 +1000)
We test "clean_zn_cnt" for negative later in the function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Glauber Costa <glommer@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ubifs/shrinker.c

index 68ce39965f0fc0ece7e44cce442a08928fe243c8..f35135e28e96f11913e8727983c80f7ba77e2956 100644 (file)
@@ -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