• Jens Axboe's avatar
    [PATCH] fix ide-cd racy completions · 53c5395a
    Jens Axboe authored
    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: default avatarJens Axboe <axboe@suse.de>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    53c5395a
ide-cd.c 102 KB