[PATCH] dev_t handling cleanups (12/12)
added the exclusion between ADD_PARTITION/DELETE_PARTITION/open() (BLKPG ioctls didn't grab ->bd_sem when they should have). added bdev->bd_part; it is set at open() to point to the hd_struct of partition in question, reset on final close. blk_partition_remap() uses ->bd_part instead of the current mess ->bd_offset is gone, we use ->bd_part->start_sect instead added missing ->release() to hd_struct kobject, moved kfree() into it ->bd_part cotributes to refcount of hd_struct - we bump it when ->bd_part is set and drop when it's reset.
Showing
Please register or sign in to comment