]> git.hungrycats.org Git - linux/commit
[PATCH] md: Fix raid1 oops
authorNeil Brown <neilb@cse.unsw.edu.au>
Sat, 12 Apr 2003 20:04:42 +0000 (13:04 -0700)
committerJames Bottomley <jejb@raven.il.steeleye.com>
Sat, 12 Apr 2003 20:04:42 +0000 (13:04 -0700)
commit7b87c44eae286a1644612620c7ad45a231e549e5
tree9f89fcbc550314c887d30c03f365269d564a5ad7
parentef2422620c6a9193b5cb1c51be7b9a81a4583fcb
[PATCH] md: Fix raid1 oops

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.
drivers/md/raid1.c