diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-10-13 11:00:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2021-10-13 11:00:02 -0400 |
commit | e489658c490524a921bc30474fa54d55aa8867c4 (patch) | |
tree | 20843a865bf1e719be852b7bcb570275212b0baa /libbcachefs/varint.c | |
parent | 385dcecb96239a20ac7fa588baea45aa8feaaea7 (diff) |
Update bcachefs sources to 07c2895cb3 bcachefs: Add a valgrind memcheck hint
Diffstat (limited to 'libbcachefs/varint.c')
-rw-r--r-- | libbcachefs/varint.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libbcachefs/varint.c b/libbcachefs/varint.c index 752179b2..a2d6bb71 100644 --- a/libbcachefs/varint.c +++ b/libbcachefs/varint.c @@ -4,6 +4,10 @@ #include <linux/string.h> #include <asm/unaligned.h> +#ifdef CONFIG_VALGRIND +#include <valgrind/memcheck.h> +#endif + #include "varint.h" /** @@ -95,6 +99,9 @@ int bch2_varint_encode_fast(u8 *out, u64 v) */ int bch2_varint_decode_fast(const u8 *in, const u8 *end, u64 *out) { +#ifdef CONFIG_VALGRIND + VALGRIND_MAKE_MEM_DEFINED(in, 8); +#endif u64 v = get_unaligned_le64(in); unsigned bytes = ffz(*in) + 1; |