diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-05-24 11:56:01 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:22 -0400 |
commit | 572ad769f59519fad80ed7241c44d7330bc379b4 (patch) | |
tree | fcae48642b3398e6d4c35739059b8782bb1bfa7b /fs/bcachefs | |
parent | 4ee202e2b70fc8f6a7abd8fc3b3a8024c437fe24 (diff) | |
download | lwn-572ad769f59519fad80ed7241c44d7330bc379b4.tar.gz lwn-572ad769f59519fad80ed7241c44d7330bc379b4.zip |
bcachefs: Fix cached sectors not being updated on invalidate
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs')
-rw-r--r-- | fs/bcachefs/btree_update_leaf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_update_leaf.c b/fs/bcachefs/btree_update_leaf.c index 7475d5c4420b..feaefb00ef71 100644 --- a/fs/bcachefs/btree_update_leaf.c +++ b/fs/bcachefs/btree_update_leaf.c @@ -620,11 +620,12 @@ static inline int do_btree_insert_at(struct btree_trans *trans, !update_triggers_transactional(trans, i)) bch2_mark_update(trans, i, &fs_usage->u, 0); - if (fs_usage && trans->fs_usage_deltas) { + if (fs_usage && trans->fs_usage_deltas) bch2_replicas_delta_list_apply(c, &fs_usage->u, trans->fs_usage_deltas); + + if (fs_usage) bch2_trans_fs_usage_apply(trans, fs_usage); - } if (likely(!(trans->flags & BTREE_INSERT_NOMARK)) && unlikely(c->gc_pos.phase)) |