Skip to content

Commit

Permalink
backing-dev: bdi sb prune should be in the unregister path, not destroy
Browse files Browse the repository at this point in the history
Commit 592b09a was different from
the tested path, in that it moved the bdi super_block prune from
unregister to destroy context. This doesn't fully fix the sync hang
bug on unexpected device removal, as need to prune the bdi cache
pointer before killing flusher thread.

Tested-by: Artur Skawina <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Nov 3, 2009
1 parent 5f04eeb commit 8c4db33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mm/backing-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,8 @@ static void bdi_prune_sb(struct backing_dev_info *bdi)
void bdi_unregister(struct backing_dev_info *bdi)
{
if (bdi->dev) {
bdi_prune_sb(bdi);

if (!bdi_cap_flush_forker(bdi))
bdi_wb_shutdown(bdi);
bdi_debug_unregister(bdi);
Expand Down Expand Up @@ -697,7 +699,6 @@ void bdi_destroy(struct backing_dev_info *bdi)
spin_unlock(&inode_lock);
}

bdi_prune_sb(bdi);
bdi_unregister(bdi);

for (i = 0; i < NR_BDI_STAT_ITEMS; i++)
Expand Down

0 comments on commit 8c4db33

Please sign in to comment.