Commit b753d4b3 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Fix this_cpu_ptr() usage

Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 2d587674
......@@ -1392,7 +1392,7 @@ static int bch2_fs_usage_apply(struct bch_fs *c,
struct disk_reservation *disk_res,
unsigned journal_seq)
{
struct bch_fs_usage *dst = fs_usage_ptr(c, journal_seq, false);
struct bch_fs_usage *dst;
s64 added = src->u.data + src->u.reserved;
s64 should_not_have_added;
int ret = 0;
......@@ -1420,6 +1420,7 @@ static int bch2_fs_usage_apply(struct bch_fs *c,
this_cpu_add(*c->online_reserved, src->online_reserved);
preempt_disable();
dst = fs_usage_ptr(c, journal_seq, false);
acc_u64s((u64 *) dst, (u64 *) &src->u, fs_usage_u64s(c));
preempt_enable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment