mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 06:30:20 -04:00
bcachefs: Switch to macro for bkey_ops
Older versions of gcc refuse to compile it the other way Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
5934a0caf2
commit
9ba68f6cdc
@@ -75,10 +75,10 @@ static void key_type_inline_data_to_text(struct printbuf *out, struct bch_fs *c,
|
||||
pr_buf(out, "(%zu bytes)", bkey_val_bytes(k.k));
|
||||
}
|
||||
|
||||
static const struct bkey_ops bch2_bkey_ops_inline_data = {
|
||||
.key_invalid = key_type_inline_data_invalid,
|
||||
.val_to_text = key_type_inline_data_to_text,
|
||||
};
|
||||
#define bch2_bkey_ops_inline_data (struct bkey_ops) { \
|
||||
.key_invalid = key_type_inline_data_invalid, \
|
||||
.val_to_text = key_type_inline_data_to_text, \
|
||||
}
|
||||
|
||||
static const struct bkey_ops bch2_bkey_ops[] = {
|
||||
#define x(name, nr) [KEY_TYPE_##name] = bch2_bkey_ops_##name,
|
||||
|
||||
Reference in New Issue
Block a user