bcachefs: Fix subvol deletion deadlock
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 9 Jun 2023 19:41:41 +0000 (15:41 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:03 +0000 (17:10 -0400)
commitb0e8c75e40a863dd40ecdf8fd6f8cdceacb965e5
tree337926d3fca8ddf4550eca6f026462ed2f606384
parent5bc740820e7ae01b26a4dbb612df086f41f79785
bcachefs: Fix subvol deletion deadlock

d_prune_aliases() may call bch2_evict_inode(), which needs
c->vfs_inodes_list_lock.

Fix this by always calling igrab() before putting the inodes onto our
disposal list, and then calling d_prune_aliases() with
c->vfs_inodes_lock dropped.

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