diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-03-05 05:05:55 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:55 +0200 |
commit | ac2ccddc2689d5889fd1520383738b60dbafc1d0 (patch) | |
tree | c090c0f7749633a7d03ba3790fc2f9ec1b396318 /fs/bcachefs/btree_key_cache.c | |
parent | bcachefs: BKEY_PADDED_ONSTACK() (diff) | |
download | linux-ac2ccddc2689d5889fd1520383738b60dbafc1d0.tar.xz linux-ac2ccddc2689d5889fd1520383738b60dbafc1d0.zip |
bcachefs: Drop some anonymous structs, unions
Rust bindgen doesn't cope well with anonymous structs and unions. This
patch drops the fancy anonymous structs & unions in bkey_i that let us
use the same helpers for bkey_i and bkey_packed; since bkey_packed is an
internal type that's never exposed to outside code, it's only a minor
inconvenienc.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_key_cache.c')
-rw-r--r-- | fs/bcachefs/btree_key_cache.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/btree_key_cache.c b/fs/bcachefs/btree_key_cache.c index 1e692c0a2f3a..074c61f271d3 100644 --- a/fs/bcachefs/btree_key_cache.c +++ b/fs/bcachefs/btree_key_cache.c @@ -776,14 +776,14 @@ bool bch2_btree_insert_key_cached(struct btree_trans *trans, struct bkey_cached *ck = (void *) path->l[0].b; bool kick_reclaim = false; - BUG_ON(insert->u64s > ck->u64s); + BUG_ON(insert->k.u64s > ck->u64s); if (likely(!(flags & BTREE_INSERT_JOURNAL_REPLAY))) { int difference; - BUG_ON(jset_u64s(insert->u64s) > trans->journal_preres.u64s); + BUG_ON(jset_u64s(insert->k.u64s) > trans->journal_preres.u64s); - difference = jset_u64s(insert->u64s) - ck->res.u64s; + difference = jset_u64s(insert->k.u64s) - ck->res.u64s; if (difference > 0) { trans->journal_preres.u64s -= difference; ck->res.u64s += difference; |