summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-05-26 21:06:50 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-05-26 21:06:50 +0200
commit75e3f3ee3c64968d42f4843ec49e579f84b5aa0c (patch)
tree0522cb42944f2da85143f234b0f4b3f5319834eb /net
parent8892cbaf686fb18a5f0558b9fd7773b32c0c7852 (diff)
downloadlinux-75e3f3ee3c64968d42f4843ec49e579f84b5aa0c.tar.gz
linux-75e3f3ee3c64968d42f4843ec49e579f84b5aa0c.tar.bz2
linux-75e3f3ee3c64968d42f4843ec49e579f84b5aa0c.zip
block: always allocate genhd->ev if check_events is implemented
9fd097b149 (block: unexport DISK_EVENT_MEDIA_CHANGE for legacy/fringe drivers) removed DISK_EVENT_MEDIA_CHANGE from legacy/fringe block drivers which have inadequate ->check_events(). Combined with earlier change 7c88a168da (block: don't propagate unlisted DISK_EVENTs to userland), this enables using ->check_events() for internal processing while avoiding enabling in-kernel block event polling which can lead to infinite event loop. Unfortunately, this made many drivers including floppy without any bit set in disk->events and ->async_events in which case disk_add_events() simply skipped allocation of disk->ev, which disables whole event handling. As ->check_events() is still used during open processing for revalidation, this can lead to open failure. This patch always allocates disk->ev if ->check_events is implemented. In the long term, it would make sense to simply include the event structure inline into genhd as it's now used by virtually all block devices. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Ondrej Zary <linux@rainbow-software.org> Reported-by: Alex Villacis Lasso <avillaci@ceibo.fiec.espol.edu.ec> Cc: stable@kernel.org Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions