diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/backing-dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 1065b715ef6..11aee09dd2a 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c | |||
@@ -628,6 +628,8 @@ static void bdi_prune_sb(struct backing_dev_info *bdi) | |||
628 | void bdi_unregister(struct backing_dev_info *bdi) | 628 | void bdi_unregister(struct backing_dev_info *bdi) |
629 | { | 629 | { |
630 | if (bdi->dev) { | 630 | if (bdi->dev) { |
631 | bdi_prune_sb(bdi); | ||
632 | |||
631 | if (!bdi_cap_flush_forker(bdi)) | 633 | if (!bdi_cap_flush_forker(bdi)) |
632 | bdi_wb_shutdown(bdi); | 634 | bdi_wb_shutdown(bdi); |
633 | bdi_debug_unregister(bdi); | 635 | bdi_debug_unregister(bdi); |
@@ -697,7 +699,6 @@ void bdi_destroy(struct backing_dev_info *bdi) | |||
697 | spin_unlock(&inode_lock); | 699 | spin_unlock(&inode_lock); |
698 | } | 700 | } |
699 | 701 | ||
700 | bdi_prune_sb(bdi); | ||
701 | bdi_unregister(bdi); | 702 | bdi_unregister(bdi); |
702 | 703 | ||
703 | for (i = 0; i < NR_BDI_STAT_ITEMS; i++) | 704 | for (i = 0; i < NR_BDI_STAT_ITEMS; i++) |