kernel-ark/block
Derek Basehore 12c2bdb232 block: prevent race/cleanup
Remove a race condition which causes a warning in disk_clear_events.  This
is a race between disk_clear_events() and disk_flush_events().
ev->clearing will be altered by disk_flush_events() even though we are
blocking event checking through disk_flush_events().  If this happens
after ev->clearing was cleared for disk_clear_events(), this can cause the
WARN_ON_ONCE() in that function to be triggered.

This change also has disk_clear_events() not go through a workqueue.
Since we have to wait for the work to complete, we should just call the
function directly.  Also, since this work cannot be put on a freezable
workqueue, it will have to contend with increased demand, so calling the
function directly avoids this.

[akpm@linux-foundation.org: fix spello in comment]
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Cc: Mandeep Singh Baines <msb@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-12-19 20:36:10 +01:00
..
partitions Merge branch 'for-3.8/drivers' of git://git.kernel.dk/linux-block 2012-12-17 13:39:11 -08:00
blk-cgroup.c Merge branch 'for-3.8/core' of git://git.kernel.dk/linux-block 2012-12-17 08:27:23 -08:00
blk-cgroup.h
blk-core.c block: export block_unplug tracepoint 2012-12-14 20:49:27 +01:00
blk-exec.c Merge branch 'for-3.8/core' of git://git.kernel.dk/linux-block 2012-12-17 08:27:23 -08:00
blk-flush.c
blk-integrity.c
blk-ioc.c
blk-iopoll.c
blk-lib.c block: add plug for blkdev_issue_discard 2012-12-14 20:46:04 +01:00
blk-map.c
blk-merge.c
blk-settings.c block: discard granularity might not be power of 2 2012-12-14 20:46:04 +01:00
blk-softirq.c
blk-sysfs.c block: Rename queue dead flag 2012-12-06 14:30:58 +01:00
blk-tag.c
blk-throttle.c block: Rename queue dead flag 2012-12-06 14:30:58 +01:00
blk-timeout.c
blk.h block: Avoid that request_fn is invoked on a dead queue 2012-12-06 14:32:01 +01:00
bsg-lib.c bsg: Remove unused function bsg_goose_queue() 2012-12-06 14:33:02 +01:00
bsg.c
cfq-iosched.c block CFQ: avoid moving request to different queue 2012-11-06 12:39:51 +01:00
compat_ioctl.c
deadline-iosched.c deadline: Allow 0ms deadline latency, increase the read speed 2012-12-09 19:19:23 +01:00
elevator.c block: recursive merge requests 2012-11-09 08:44:27 +01:00
genhd.c block: prevent race/cleanup 2012-12-19 20:36:10 +01:00
ioctl.c
Kconfig percpu_rw_semaphore: introduce CONFIG_PERCPU_RWSEM 2012-12-17 17:15:18 -08:00
Kconfig.iosched
Makefile
noop-iosched.c
partition-generic.c
scsi_ioctl.c