diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2020-02-07 04:15:15 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:35 +0300 |
commit | 1f49dafcd3191de1db9b6105983696b5bc7aedad (patch) | |
tree | 50c3a618e3ae2dffbef272a5cc5b72812851d060 /fs/bcachefs/bkey_methods.c | |
parent | c4a94ae3da7c666d5d5230897a3f6d1e9d8d8b55 (diff) | |
download | linux-1f49dafcd3191de1db9b6105983696b5bc7aedad.tar.xz |
bcachefs: Fix bch2_ptr_swab for indirect extents
bch2_ptr_swab was never updated when the code for generic keys with
pointers was added - it assumed the entire val was only used for
pointers.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bkey_methods.c')
-rw-r--r-- | fs/bcachefs/bkey_methods.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/bcachefs/bkey_methods.c b/fs/bcachefs/bkey_methods.c index 320e17d108d2..c064cf468a9b 100644 --- a/fs/bcachefs/bkey_methods.c +++ b/fs/bcachefs/bkey_methods.c @@ -202,15 +202,12 @@ void bch2_bkey_val_to_text(struct printbuf *out, struct bch_fs *c, bch2_val_to_text(out, c, k); } -void bch2_bkey_swab(const struct bkey_format *f, - struct bkey_packed *k) +void bch2_bkey_swab_val(struct bkey_s k) { - const struct bkey_ops *ops = &bch2_bkey_ops[k->type]; - - bch2_bkey_swab_key(f, k); + const struct bkey_ops *ops = &bch2_bkey_ops[k.k->type]; if (ops->swab) - ops->swab(f, k); + ops->swab(k); } bool bch2_bkey_normalize(struct bch_fs *c, struct bkey_s k) |