bcachefs: Don't allocate memory under the btree cache lock
authorKent Overstreet <kent.overstreet@gmail.com>
Tue, 9 Jun 2020 21:49:24 +0000 (17:49 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:41 +0000 (17:08 -0400)
commite38821f322d97ca1289bea704eed9d276f47c521
tree4a6a9cf44ce89792e291b52a47ac13a9c4100630
parent966885ee409d128e2561e4c3546f4187ee173389
bcachefs: Don't allocate memory under the btree cache lock

The btree cache lock is needed for reclaiming from the btree node cache,
and memory allocation can potentially spin and sleep (for 100 ms at a
time), so.. don't do that.

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