diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-26 17:49:34 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:10:16 -0400 |
commit | 4637429e3946d083eedde1668c17a4fadaf3c0b1 (patch) | |
tree | e963537ab982b1a82fa0aa33afab53713ce33fa7 /fs/bcachefs/quota.c | |
parent | be47e0ba4fc92bd065ac0b7ad345913eea1bc6fc (diff) | |
download | lwn-4637429e3946d083eedde1668c17a4fadaf3c0b1.tar.gz lwn-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/quota.c')
-rw-r--r-- | fs/bcachefs/quota.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/quota.c b/fs/bcachefs/quota.c index 36de2f071d80..cb68ae44d597 100644 --- a/fs/bcachefs/quota.c +++ b/fs/bcachefs/quota.c @@ -513,12 +513,12 @@ void bch2_fs_quota_init(struct bch_fs *c) static struct bch_sb_field_quota *bch2_sb_get_or_create_quota(struct bch_sb_handle *sb) { - struct bch_sb_field_quota *sb_quota = bch2_sb_get_quota(sb->sb); + struct bch_sb_field_quota *sb_quota = bch2_sb_field_get(sb->sb, quota); if (sb_quota) return sb_quota; - sb_quota = bch2_sb_resize_quota(sb, sizeof(*sb_quota) / sizeof(u64)); + sb_quota = bch2_sb_field_resize(sb, quota, sizeof(*sb_quota) / sizeof(u64)); if (sb_quota) { unsigned qtype, qc; @@ -536,7 +536,7 @@ static void bch2_sb_quota_read(struct bch_fs *c) struct bch_sb_field_quota *sb_quota; unsigned i, j; - sb_quota = bch2_sb_get_quota(c->disk_sb.sb); + sb_quota = bch2_sb_field_get(c->disk_sb.sb, quota); if (!sb_quota) return; |