diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2018-07-23 16:13:07 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:08:08 +0300 |
commit | 277c981c634f3e64dd99523aabfd9ed5e6c5be55 (patch) | |
tree | 71639c412531bfe8e8e992508645bedf8fdcc8fa /fs/bcachefs/quota.c | |
parent | bb1b3658aa7259bdacf7500abdeb8fdff61a51ba (diff) | |
download | linux-277c981c634f3e64dd99523aabfd9ed5e6c5be55.tar.xz |
bcachefs: fix bch2_val_to_text()
was returning wrong value
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/quota.c')
-rw-r--r-- | fs/bcachefs/quota.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/bcachefs/quota.c b/fs/bcachefs/quota.c index 0adbfe523f51..0a305ad08188 100644 --- a/fs/bcachefs/quota.c +++ b/fs/bcachefs/quota.c @@ -46,10 +46,10 @@ static const char * const bch2_quota_counters[] = { "inodes", }; -void bch2_quota_to_text(struct bch_fs *c, char *buf, - size_t size, struct bkey_s_c k) +int bch2_quota_to_text(struct bch_fs *c, char *buf, + size_t size, struct bkey_s_c k) { - char *out = buf, *end= buf + size; + char *out = buf, *end = buf + size; struct bkey_s_c_quota dq; unsigned i; @@ -64,6 +64,8 @@ void bch2_quota_to_text(struct bch_fs *c, char *buf, le64_to_cpu(dq.v->c[i].softlimit)); break; } + + return out - buf; } #ifdef CONFIG_BCACHEFS_QUOTA |