summaryrefslogtreecommitdiff
path: root/mm/backing-dev.c
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-03-17 11:13:12 +0100
committerNiket Sirsi <nsirsi@nvidia.com>2011-06-06 18:19:10 -0700
commit0d265ae5c754b6e079eec89f911c8815da835639 (patch)
treeb96435690734a2f58d7d194b9afd91236253fe00 /mm/backing-dev.c
parente3406d78b92c711773eb399cbc1d788c7550bc90 (diff)
fs: assign sb->s_bdi to default_backing_dev_info if the bdi is going away
We don't have proper reference counting for this yet, so we run into cases where the device is pulled and we OOPS on flushing the fs data. This happens even though the dirty inodes have already been migrated to the default_backing_dev_info. Bug 808894 (cherry picked from commit 95f28604a65b1c40b6c6cd95e58439cd7ded3add of kernel.org, linux-2.6 tree) Signed-off-by: Jens Axboe <jaxboe@fusionio.com> Change-Id: I56476eb6d33d0fbc0472c0a35dec02e13c4202c9 Reviewed-on: http://git-master/r/32921 Reviewed-by: Venkata Jagadish <vjagadish@nvidia.com> Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Tested-by: Venkata Jagadish <vjagadish@nvidia.com>
Diffstat (limited to 'mm/backing-dev.c')
-rw-r--r--mm/backing-dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 65d420499a61..58436e5b08cd 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -604,7 +604,7 @@ static void bdi_prune_sb(struct backing_dev_info *bdi)
spin_lock(&sb_lock);
list_for_each_entry(sb, &super_blocks, s_list) {
if (sb->s_bdi == bdi)
- sb->s_bdi = NULL;
+ sb->s_bdi = &default_backing_dev_info;
}
spin_unlock(&sb_lock);
}