summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2013-08-08 12:59:28 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-08-15 16:12:30 +1000
commit88f07983835bbbd4ce2e021d5f2a97c1f6a81c0f (patch)
tree4401134d7e5a1479e152c1beddefd8a7d0927a68 /fs
parent970788ba115640cfed679ea569ec3b6fdc7bdfce (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>
Diffstat (limited to 'fs')
-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