]> git.karo-electronics.de Git - karo-tx-linux.git/commit
md/raid1: Don't release reference to device while handling read error.
authorNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:27 +0000 (12:37 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 27 Sep 2012 02:37:27 +0000 (12:37 +1000)
commitc809064145d88b873c6acdced5a412aabbe8b8e5
tree6e1e5a72f0e0823c510f2d1a96342f8f52038b62
parent8abb18cbd4eb2330592b62c900a1708f99568d3f
md/raid1: Don't release reference to device while handling read error.

When we get a read error, we arrange for raid1d to handle it.
Currently we release the reference on the device.  This can result
in
   conf->mirrors[read_disk].rdev
being NULL in fix_read_error, if the device happens to get removed
before the read error is handled.

So instead keep the reference until the read error has been fully
handled.

Reported-by: hank <pyu@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid1.c