summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-07-19 10:00:00 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-07-19 13:11:30 +1000
commit091f2f1f25080bc94ada30ff91372494fcfc652d (patch)
tree17951d72f92c7d12fa5fa1a49f3573dc5bc03923
parent44d9c5194879d8e729924027cf13a148291149f2 (diff)
UBIFS: signedness bug in ubifs_shrink_count()
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>
-rw-r--r--fs/ubifs/shrinker.c2
1 files changed, 1 insertions, 1 deletions
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