bcachefs: Fix a locking bug in bch2_journal_pin_copy()
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 11 Apr 2020 16:29:32 +0000 (12:29 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:38 +0000 (17:08 -0400)
commit94035eed52f58a321fa28e938898535973bec847
treefb9d64d55bd18c9dd5e2f9d7798b13349daaa9f1
parent58fb3e519a7612a01d9fc969aa4eca56b30d898e
bcachefs: Fix a locking bug in bch2_journal_pin_copy()

There was a race where the src pin would be flushed - releasing the last
pin on that sequence number - before adding the new journal pin. Oops.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal_reclaim.c