On Mon, Nov 22, 2010 at 09:41:13PM -0600, Dave Kleikamp wrote: > I see three potential ways to fix this. > > 1. bdi_prune_sb() could set sb->s_bdi to &default_backing_dev_info > rather than NULL > 2. inode_to_bdi() could return &default_backing_dev_info (or > inode->i_mapping->backing_dev_info) if sb->s_bdi is NULL. > 3. the callers of inode_to_bdi() could check for s_bdi being NULL and > exit gracefully. > > It seems that Jens and Christoph have ideas about cleaning up the bdi > stuff, so this may be a short-term fix. It's a mess. The correct fix is to never unregister a bdi that still has a life filesystem on it. This seems to be solved by plain removing the unlink_gendisk call in unlink_gendisk. Unlink_gendisk just removes the gendisk from visibility, but it still lives on as long as we have references to it. We already have a bdi_destroy call in blk_release_queue that should unregister the BDI once it's reference count finally reaches zero. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html