diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-08-02 02:06:45 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:10:09 +0200 |
commit | bf5a261c7af80a2ac10bcc3ce0382cb238eccb8b (patch) | |
tree | ba891c5c8486cc26935c90b4c899baf1ae86af9d /fs/bcachefs/alloc_background.c | |
parent | bcachefs: Move fsck_inode_rm() to inode.c (diff) | |
download | linux-bf5a261c7af80a2ac10bcc3ce0382cb238eccb8b.tar.xz linux-bf5a261c7af80a2ac10bcc3ce0382cb238eccb8b.zip |
bcachefs: Assorted fixes for clang
clang had a few more warnings about enum conversion, and also didn't
like the opts.c initializer.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index 1f6a518cbe36..18b97416750f 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -79,36 +79,6 @@ static inline u64 alloc_field_v1_get(const struct bch_alloc *a, return v; } -static inline void alloc_field_v1_put(struct bkey_i_alloc *a, void **p, - unsigned field, u64 v) -{ - unsigned bytes = BCH_ALLOC_V1_FIELD_BYTES[field]; - - if (!v) - return; - - a->v.fields |= 1 << field; - - switch (bytes) { - case 1: - *((u8 *) *p) = v; - break; - case 2: - *((__le16 *) *p) = cpu_to_le16(v); - break; - case 4: - *((__le32 *) *p) = cpu_to_le32(v); - break; - case 8: - *((__le64 *) *p) = cpu_to_le64(v); - break; - default: - BUG(); - } - - *p += bytes; -} - static void bch2_alloc_unpack_v1(struct bkey_alloc_unpacked *out, struct bkey_s_c k) { @@ -1334,7 +1304,7 @@ static int bch2_check_discard_freespace_key(struct btree_trans *trans, struct btree_iter *iter, struct bpos end) { - if (!btree_node_type_is_extents(iter->btree_id)) { + if (!btree_id_is_extents(iter->btree_id)) { return __bch2_check_discard_freespace_key(trans, iter); } else { int ret = 0; |