On Wed, Sep 01, 2021 at 01:19:44PM +0900, Tetsuo Handa wrote: > Are the changes by add_disk() made atomically against the caller? > If there is a moment where "struct block_device_operations"->open can be > called when add_disk() might still fail, how is it protected from the > kfree() path? The new add_disk is structured so tht it won't fail after the block device inode is hashed. That is, the last possible failure is before ->open can be called.