[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1293557352-10592-2-git-send-email-tj@kernel.org>
Date: Tue, 28 Dec 2010 18:28:57 +0100
From: Tejun Heo <tj@...nel.org>
To: axboe@...nel.dk, linux-kernel@...r.kernel.org,
kay.sievers@...y.org, hch@...radead.org
Cc: Tejun Heo <tj@...nel.org>
Subject: [PATCH 01/16] 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 <tj@...nel.org>
Cc: Jens Axboe <axboe@...nel.dk>
Cc: Kay Sievers <kay.sievers@...y.org>
---
block/genhd.c | 2 +-
fs/block_dev.c | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/block/genhd.c b/block/genhd.c
index 5465a82..a1d41dc 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1492,7 +1492,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 6017389..c620628 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1377,6 +1377,7 @@ int blkdev_put(struct block_device *bdev, fmode_t mode)
bd_unlink_disk_holder(bdev);
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);
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists