]> www.infradead.org Git - users/dwmw2/linux.git/commit
bcachefs: Fix deadlock in __wait_on_freeing_inode()
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 16 Aug 2024 16:31:53 +0000 (12:31 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Mon, 9 Sep 2024 13:41:47 +0000 (09:41 -0400)
commit54f7702466b3a10b9a81e3c1c2c9da33df7a655f
tree0f7d071b9cc6942f4a9c55db0d336ca364a82faa
parent112d21fd1a122f778c383aa44d5448f4da9518c3
bcachefs: Fix deadlock in __wait_on_freeing_inode()

We can't call __wait_on_freeing_inode() with btree locks held; we're
waiting on another thread that's in evict(), and before it clears that
bit it needs to write that inode to flush timestamps - deadlock.

Fixing this involves a fair amount of re-jiggering to plumb a new
transaction restart.

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