projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f0f731
)
bcachefs: Fix cached data accounting
author
Kent Overstreet
<kent.overstreet@linux.dev>
Tue, 11 Oct 2022 08:49:23 +0000
(
04:49
-0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:43 +0000
(17:09 -0400)
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>
fs/bcachefs/buckets.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/buckets.c
b/fs/bcachefs/buckets.c
index 4b041707cd54b9e1495adc668db6e0c3b79eab56..5cb4a00166f93ad7eb388314a07bdab7417a21a3 100644
(file)
--- a/
fs/bcachefs/buckets.c
+++ b/
fs/bcachefs/buckets.c
@@
-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");