projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e242b92
)
bcachefs: Fix bch2_journal_flush_device_pins()
author
Kent Overstreet
<kent.overstreet@gmail.com>
Mon, 7 Mar 2022 06:35:55 +0000
(
01:35
-0500)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:48 +0000
(17:09 -0400)
It's now legal for the pin fifo to be empty, which means this code needs
to be updated in order to not hit an assert.
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
fs/bcachefs/journal_reclaim.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/journal_reclaim.c
b/fs/bcachefs/journal_reclaim.c
index b683a13dbf87778a886069d9c8de3df89506805f..e8b7ed8e1333674c3a1f3cb30f6e624138bd7781 100644
(file)
--- a/
fs/bcachefs/journal_reclaim.c
+++ b/
fs/bcachefs/journal_reclaim.c
@@
-831,10
+831,12
@@
int bch2_journal_flush_device_pins(struct journal *j, int dev_idx)
seq = 0;
spin_lock(&j->lock);
- while (!ret
&& seq < j->pin.back
) {
+ while (!ret) {
struct bch_replicas_padded replicas;
seq = max(seq, journal_last_seq(j));
+ if (seq >= j->pin.back)
+ break;
bch2_devlist_to_replicas(&replicas.e, BCH_DATA_journal,
journal_seq_pin(j, seq)->devs);
seq++;