mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
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>
This commit is contained in:
parent
a91a2785b2
commit
95f28604a6
3 changed files with 5 additions and 3 deletions
|
@ -598,7 +598,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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue