Hi. On Fri, Apr 10, 2020 at 07:45:44AM +0200, Christoph Hellwig <hch@xxxxxx> wrote: > @@ -496,7 +496,7 @@ int blk_drop_partitions(struct gendisk *disk, struct block_device *bdev) > - if (bdev->bd_part_count || bdev->bd_openers) > + if (bdev->bd_part_count || bdev->bd_openers > 1) > return -EBUSY; I noticed this (and the previous patch) change unmasks race between ioctl(LOOP_SET_STATUS64, ... lo_flags=LO_FLAGS_PARTSCAN ...) and udev processing loop device uevents. See [1] for details. Should the condition be changed in the case of newly setup loop devices? (Or shouldn't the ioctl propagate EBUSY in its return value?) Thanks, Michal [1] https://bugzilla.opensuse.org/show_bug.cgi?id=1169932
Attachment:
signature.asc
Description: Digital signature