summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/super-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-08-01 20:06:45 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:09 -0400
commitbf5a261c7af80a2ac10bcc3ce0382cb238eccb8b (patch)
treeba891c5c8486cc26935c90b4c899baf1ae86af9d /fs/bcachefs/super-io.c
parent7904c82ceae963b0f89e96a49dc714adffe3adc6 (diff)
downloadlinux-bf5a261c7af80a2ac10bcc3ce0382cb238eccb8b.tar.gz
linux-bf5a261c7af80a2ac10bcc3ce0382cb238eccb8b.tar.bz2
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/super-io.c')
-rw-r--r--fs/bcachefs/super-io.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/bcachefs/super-io.c b/fs/bcachefs/super-io.c
index cea7c7caa1c0..beb00f799fe4 100644
--- a/fs/bcachefs/super-io.c
+++ b/fs/bcachefs/super-io.c
@@ -265,16 +265,13 @@ struct bch_sb_field *bch2_sb_field_resize(struct bch_sb_handle *sb,
/* Superblock validate: */
-static inline void __bch2_sb_layout_size_assert(void)
-{
- BUILD_BUG_ON(sizeof(struct bch_sb_layout) != 512);
-}
-
static int validate_sb_layout(struct bch_sb_layout *layout, struct printbuf *out)
{
u64 offset, prev_offset, max_sectors;
unsigned i;
+ BUILD_BUG_ON(sizeof(struct bch_sb_layout) != 512);
+
if (!uuid_equal(&layout->magic, &BCACHE_MAGIC) &&
!uuid_equal(&layout->magic, &BCHFS_MAGIC)) {
prt_printf(out, "Not a bcachefs superblock layout");