Skip to contentSkip to conversation

UBIFS: signedness bug in ubifs_shrink_count()

PATCH New Dan Carpenter 1 participant 1 message Jun 11, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 UBIFS: signedness bug in ubifs_shrink_count()

We test "clean_zn_cnt" for negative later in the function.

---
This was introduced in the -mm branch in:
fs-convert-fs-shrinkers-to-new-scan-count-api-fix

fs/ubifs/shrinker.c +1 -1
index 68ce399..f35135e 100644
@@ -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

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>