summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/sb-clean.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-09-26 17:49:34 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:10:16 -0400
commit4637429e3946d083eedde1668c17a4fadaf3c0b1 (patch)
treee963537ab982b1a82fa0aa33afab53713ce33fa7 /fs/bcachefs/sb-clean.c
parentbe47e0ba4fc92bd065ac0b7ad345913eea1bc6fc (diff)
downloadlinux-4637429e3946d083eedde1668c17a4fadaf3c0b1.tar.gz
linux-4637429e3946d083eedde1668c17a4fadaf3c0b1.tar.bz2
linux-4637429e3946d083eedde1668c17a4fadaf3c0b1.zip
bcachefs: bch2_sb_field_get() refactoring
Instead of using token pasting to generate methods for each superblock section, just make the type a parameter to bch2_sb_field_get(). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/sb-clean.c')
-rw-r--r--fs/bcachefs/sb-clean.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/sb-clean.c b/fs/bcachefs/sb-clean.c
index a3695e56a155..61203d7c8d36 100644
--- a/fs/bcachefs/sb-clean.c
+++ b/fs/bcachefs/sb-clean.c
@@ -137,7 +137,7 @@ struct bch_sb_field_clean *bch2_read_superblock_clean(struct bch_fs *c)
int ret;
mutex_lock(&c->sb_lock);
- sb_clean = bch2_sb_get_clean(c->disk_sb.sb);
+ sb_clean = bch2_sb_field_get(c->disk_sb.sb, clean);
if (fsck_err_on(!sb_clean, c,
"superblock marked clean but clean section not present")) {
@@ -359,7 +359,7 @@ void bch2_fs_mark_clean(struct bch_fs *c)
u64s = sizeof(*sb_clean) / sizeof(u64) + c->journal.entry_u64s_reserved;
- sb_clean = bch2_sb_resize_clean(&c->disk_sb, u64s);
+ sb_clean = bch2_sb_field_resize(&c->disk_sb, clean, u64s);
if (!sb_clean) {
bch_err(c, "error resizing superblock while setting filesystem clean");
goto out;