aboutsummaryrefslogtreecommitdiff
path: root/mm/cleancache.c
diff options
context:
space:
mode:
authorDerek Basehore <dbasehore@chromium.org>2012-12-18 12:27:20 -0800
committerJens Axboe <axboe@kernel.dk>2012-12-19 20:36:10 +0100
commit12c2bdb232168511c8dd54d6626549391a228918 (patch)
tree8b9179df57d7ddd596a57d465cce4e0949795d25 /mm/cleancache.c
parentaea24a8bbc81c8b404e4e293fb37aefaf388d35d (diff)
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>
Diffstat (limited to 'mm/cleancache.c')
0 files changed, 0 insertions, 0 deletions