Commit facc31dd authored by Tejun Heo's avatar Tejun Heo

block: Don't implicitly trigger event check on disk_unblock_events()

Currently, disk_unblock_events() implicitly kick event check if the
block count reaches zero.  This behavior is not described in the
comment and hinders with future changes.  Make the unblocker
explicitly check events by calling disk_check_events() as necessary.

This patch doesn't cause any behavior difference.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Kay Sievers <kay.sievers@vrfy.org>
parent df457f84
...@@ -1494,7 +1494,7 @@ void disk_block_events(struct gendisk *disk) ...@@ -1494,7 +1494,7 @@ void disk_block_events(struct gendisk *disk)
void disk_unblock_events(struct gendisk *disk) void disk_unblock_events(struct gendisk *disk)
{ {
if (disk->ev) if (disk->ev)
__disk_unblock_events(disk, true); __disk_unblock_events(disk, false);
} }
/** /**
......
...@@ -1446,6 +1446,7 @@ int blkdev_put(struct block_device *bdev, fmode_t mode) ...@@ -1446,6 +1446,7 @@ int blkdev_put(struct block_device *bdev, fmode_t mode)
if (bdev_free) { if (bdev_free) {
if (bdev->bd_write_holder) { if (bdev->bd_write_holder) {
disk_unblock_events(bdev->bd_disk); disk_unblock_events(bdev->bd_disk);
disk_check_events(bdev->bd_disk);
bdev->bd_write_holder = false; bdev->bd_write_holder = false;
} else } else
disk_check_events(bdev->bd_disk); disk_check_events(bdev->bd_disk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment