mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
bcachefs: Fix cached data accounting
Negating without casting to a signed integer means the value wasn't getting sign extended properly - oops. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
1f0f731ffe
commit
5b3243cb52
@ -578,7 +578,7 @@ int bch2_mark_alloc(struct btree_trans *trans,
|
||||
if ((flags & BTREE_TRIGGER_BUCKET_INVALIDATE) &&
|
||||
old_a.cached_sectors) {
|
||||
ret = update_cached_sectors(c, new, ca->dev_idx,
|
||||
-old_a.cached_sectors,
|
||||
-((s64) old_a.cached_sectors),
|
||||
journal_seq, gc);
|
||||
if (ret) {
|
||||
bch2_fs_fatal_error(c, "bch2_mark_alloc(): no replicas entry while updating cached sectors");
|
||||
|
Loading…
Reference in New Issue
Block a user