bcachefs: Fix a locking bug in the do_discard_fast() path

We can't discard a bucket while it's still open; this needs the
bucket_is_open_safe() version, which takes the open_buckets lock.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2024-06-17 09:09:52 -04:00
commit 3727ca5604