diff options
author | Tim Schlueter <schlueter.tim@linux.com> | 2018-12-10 00:20:52 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:13 +0300 |
commit | f9ccc30824a6b9f44b975c8ce952938eff5920f3 (patch) | |
tree | 5a1f541920c65e84c5a93ffe14304ecc28ae6635 /fs/bcachefs/bkey_methods.c | |
parent | 06b7345cc282ec383942afb3b5b8d42bd9eec1b8 (diff) | |
download | linux-f9ccc30824a6b9f44b975c8ce952938eff5920f3.tar.xz |
bcachefs: Fix bkey_method compilation on gcc 7.3.0
Signed-off-by: Tim Schlueter <schlueter.tim@linux.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 | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/fs/bcachefs/bkey_methods.c b/fs/bcachefs/bkey_methods.c index f518062d896b..37c44f087a0b 100644 --- a/fs/bcachefs/bkey_methods.c +++ b/fs/bcachefs/bkey_methods.c @@ -25,13 +25,13 @@ static const char *deleted_key_invalid(const struct bch_fs *c, return NULL; } -const struct bkey_ops bch2_bkey_ops_deleted = { - .key_invalid = deleted_key_invalid, -}; +#define bch2_bkey_ops_deleted (struct bkey_ops) { \ + .key_invalid = deleted_key_invalid, \ +} -const struct bkey_ops bch2_bkey_ops_discard = { - .key_invalid = deleted_key_invalid, -}; +#define bch2_bkey_ops_discard (struct bkey_ops) { \ + .key_invalid = deleted_key_invalid, \ +} static const char *empty_val_key_invalid(const struct bch_fs *c, struct bkey_s_c k) { @@ -41,9 +41,9 @@ static const char *empty_val_key_invalid(const struct bch_fs *c, struct bkey_s_c return NULL; } -const struct bkey_ops bch2_bkey_ops_error = { - .key_invalid = empty_val_key_invalid, -}; +#define bch2_bkey_ops_error (struct bkey_ops) { \ + .key_invalid = empty_val_key_invalid, \ +} static const char *key_type_cookie_invalid(const struct bch_fs *c, struct bkey_s_c k) @@ -54,13 +54,13 @@ static const char *key_type_cookie_invalid(const struct bch_fs *c, return NULL; } -const struct bkey_ops bch2_bkey_ops_cookie = { - .key_invalid = key_type_cookie_invalid, -}; +#define bch2_bkey_ops_cookie (struct bkey_ops) { \ + .key_invalid = key_type_cookie_invalid, \ +} -const struct bkey_ops bch2_bkey_ops_whiteout = { - .key_invalid = empty_val_key_invalid, -}; +#define bch2_bkey_ops_whiteout (struct bkey_ops) { \ + .key_invalid = empty_val_key_invalid, \ +} static const struct bkey_ops bch2_bkey_ops[] = { #define x(name, nr) [KEY_TYPE_##name] = bch2_bkey_ops_##name, |