bcachefs: export bch2_chacha20
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 13 Apr 2025 09:23:40 +0000 (05:23 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 22 May 2025 00:14:11 +0000 (20:14 -0400)
Needed for userspcae.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/checksum.c
fs/bcachefs/checksum.h

index d0a34a097b809ec2475048790778926543e1d7ea..ff5ab8ada777a4942498044166b7d0532402bec1 100644 (file)
@@ -106,8 +106,8 @@ static void bch2_chacha20_init(u32 state[CHACHA_STATE_WORDS],
        memzero_explicit(key_words, sizeof(key_words));
 }
 
-static void bch2_chacha20(const struct bch_key *key, struct nonce nonce,
-                         void *data, size_t len)
+void bch2_chacha20(const struct bch_key *key, struct nonce nonce,
+                  void *data, size_t len)
 {
        u32 state[CHACHA_STATE_WORDS];
 
index 1310782d3ae9300f100b60baa86d7c5648a1e804..7bd9cf6104ca127a47e2f8955b80f2b3c29ed077 100644 (file)
@@ -69,6 +69,8 @@ static inline void bch2_csum_err_msg(struct printbuf *out,
        bch2_csum_to_text(out, type, expected);
 }
 
+void bch2_chacha20(const struct bch_key *, struct nonce, void *, size_t);
+
 int bch2_request_key(struct bch_sb *, struct bch_key *);
 #ifndef __KERNEL__
 int bch2_revoke_key(struct bch_sb *);