diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-26 23:49:34 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:10:16 +0200 |
commit | 4637429e3946d083eedde1668c17a4fadaf3c0b1 (patch) | |
tree | e963537ab982b1a82fa0aa33afab53713ce33fa7 /fs/bcachefs/sb-clean.c | |
parent | bcachefs: KEY_TYPE_error now counts towards i_sectors (diff) | |
download | linux-4637429e3946d083eedde1668c17a4fadaf3c0b1.tar.xz 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.c | 4 |
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; |