mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 13:06:59 +02: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:
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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user