[patch -mm] UBIFS: signedness bug in ubifs_shrink_count()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
This was introduced in the -mm branch in:
fs-convert-fs-shrinkers-to-new-scan-count-api-fix

diff --git a/fs/ubifs/shrinker.c b/fs/ubifs/shrinker.c
index 68ce399..f35135e 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

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]