• Neil Brown's avatar
    [PATCH] md: Fix raid1 oops · 7b87c44e
    Neil Brown authored
    From: Angus Sawyer <angus.sawyer@dsl.pipex.com>
    
    When the last device in a raid1 array is failed (or missing) the r1bio
    structure can be released (especially on very fast devices) before
    make_request has finished using it.
    
    This patch gets and puts an extra reference to the r1_bio around the
    submission loop, and uses the status in r1_bio to maintain the request status
    if the last refernce is held by make_request.
    
    This is also more correct for write requests, as a write should succeed
    if any write succeeded, not only if the last write succceeded.
    7b87c44e
raid1.c 29.1 KB