]> git.dujemihanovic.xyz Git - linux.git/commitdiff
bcachefs: fix ! vs ~ typo in __clear_bit_le64()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 5 Apr 2024 15:01:02 +0000 (18:01 +0300)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 5 Apr 2024 18:42:37 +0000 (14:42 -0400)
The ! was obviously intended to be ~.  As it is, this function does
the equivalent to: "addr[bit / 64] = 0;".

Fixes: 27fcec6c27ca ("bcachefs: Clear recovery_passes_required as they complete without errors")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/util.h

index b7e7c29278fc052a90fe7c029e8fd0626c48ddc5..de639e8a3ab5381e1cde8ec68df78493af4b43ab 100644 (file)
@@ -795,7 +795,7 @@ static inline void __set_bit_le64(size_t bit, __le64 *addr)
 
 static inline void __clear_bit_le64(size_t bit, __le64 *addr)
 {
-       addr[bit / 64] &= !cpu_to_le64(BIT_ULL(bit % 64));
+       addr[bit / 64] &= ~cpu_to_le64(BIT_ULL(bit % 64));
 }
 
 static inline bool test_bit_le64(size_t bit, __le64 *addr)