[PATCH] fix ide-cd racy completions
This bug took forever to debug (just ask Ben :-). When we move the completion event from the failed request to the sense request, we risk either the initial complete and then later complete on a long gone ->waiting. I think this business of moving the completion structure to the request sense is a bit bogus and always has been, and the bug is fixed nicely by just rewriting this logic a bit. So instead we simply unconditionally dequeue the failed request (regardless of whether it was REQ_PC or REQ_BLOCK_PC), and pass a reference to it in the sense request. When the sense completes, we call end io on the originally failed request (which does the complete() etc). Signed-off-by: Jens Axboe <axboe@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment