On 2021/09/20 15:40, Christoph Hellwig wrote: > I was going to suggest to just move the bd_disk initialization after > the bd_stats allocations, but iseems like we currently don't even > the zero the bdev on allocation. So I suspect we should do that first > to avoid nasty surprises. Hmm? bdev_alloc_inode() zeros the bdev on allocation. Are you talking about some other function? static struct inode *bdev_alloc_inode(struct super_block *sb) { struct bdev_inode *ei = kmem_cache_alloc(bdev_cachep, GFP_KERNEL); if (!ei) return NULL; memset(&ei->bdev, 0, sizeof(ei->bdev)); return &ei->vfs_inode; }