diff options
author | Tejun Heo <tj@kernel.org> | 2011-03-09 19:54:27 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-03-09 19:54:27 +0100 |
commit | 69e02c59a7d962dced8047401b81a8d897e1702e (patch) | |
tree | c1dc1ef45a7f2e8cda6189eb441320bd637e877b /drivers/ide | |
parent | 6936217cc7e58573026bdba25b1bfb778e8f2267 (diff) |
block: Don't check events while open is in progress
Not all block drivers clear events immediately after reporting. Some
do so in ->revalidate_disk() or other steps during ->open(). There is
a slim chance event poll may happen between the clearing event check
from check_disk_change() and the actual clearing of the events which
would result in spurious events.
Block event checks while block device open is in progress. There is
no need to kick explicit event check afterwards as events are always
checked during open.
-v2: The original patch could have called disk_unblock_events() with
an already released or %NULL @disk causing oops. Fixed by making
sure references are put after disk_unblock_events() is called.
It also makes the error path of __blkdev_get() a bit simpler.
This problem was reported by Jens.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Diffstat (limited to 'drivers/ide')
0 files changed, 0 insertions, 0 deletions