bcachefs: refactor pin put helpers
authorBrian Foster <bfoster@redhat.com>
Fri, 15 Sep 2023 12:51:51 +0000 (08:51 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:14 +0000 (17:10 -0400)
commit92b63f5bf0774eab2e62b86f85bb4efb915edef1
treef71da33d93cb36ddbc464cb3dfae9e401f7b3fb8
parentd67a72bfc92b0c0dab9c134964090c4700892e67
bcachefs: refactor pin put helpers

We have a couple journal pin put helpers to handle cases where the
journal lock is already held or not. Refactor the helpers to lock
and reclaim from the highest level and open code the reclaim from
the one caller of the internal variant. The latter call will be
moved into the journal buf release helper in a later patch.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/journal.c
fs/bcachefs/journal_reclaim.c
fs/bcachefs/journal_reclaim.h