From: Tejun Heo Date: Wed, 9 Mar 2011 18:54:27 +0000 (+0100) Subject: block: Don't implicitly trigger event check on disk_unblock_events() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=facc31ddc3570a3a0d8951c94f16b898e01b464d;p=openwrt%2Fstaging%2Fblogic.git 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: Tejun Heo Cc: Jens Axboe Cc: Kay Sievers --- diff --git a/block/genhd.c b/block/genhd.c index 3e2b57b55e38..c91a2dac6b6b 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1494,7 +1494,7 @@ void disk_block_events(struct gendisk *disk) void disk_unblock_events(struct gendisk *disk) { if (disk->ev) - __disk_unblock_events(disk, true); + __disk_unblock_events(disk, false); } /** diff --git a/fs/block_dev.c b/fs/block_dev.c index 889287019599..fffdf86c1757 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -1446,6 +1446,7 @@ int blkdev_put(struct block_device *bdev, fmode_t mode) if (bdev_free) { if (bdev->bd_write_holder) { disk_unblock_events(bdev->bd_disk); + disk_check_events(bdev->bd_disk); bdev->bd_write_holder = false; } else disk_check_events(bdev->bd_disk);