aboutsummaryrefslogtreecommitdiffstats
path: root/mm/backing-dev.c
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-03-17 06:13:12 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-03-17 06:13:12 -0400
commit95f28604a65b1c40b6c6cd95e58439cd7ded3add (patch)
tree25b3be2d5505f06b2262bade8d1ecf5323c47ff8 /mm/backing-dev.c
parenta91a2785b200864aef2270ed6a3babac7a253a20 (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. Reported-by: Torsten Hilbrich <torsten.hilbrich@secunet.com> Tested-by: Torsten Hilbrich <torsten.hilbrich@secunet.com> Cc: stable@kernel.org Signed-off-by: Jens Axboe <jaxboe@fusionio.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 c91e139a652e..8fe9d3407921 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -598,7 +598,7 @@ static void bdi_prune_sb(struct backing_dev_info *bdi)
598 spin_lock(&sb_lock); 598 spin_lock(&sb_lock);
599 list_for_each_entry(sb, &super_blocks, s_list) { 599 list_for_each_entry(sb, &super_blocks, s_list) {
600 if (sb->s_bdi == bdi) 600 if (sb->s_bdi == bdi)
601 sb->s_bdi = NULL; 601 sb->s_bdi = &default_backing_dev_info;
602 } 602 }
603 spin_unlock(&sb_lock); 603 spin_unlock(&sb_lock);
604} 604}