]> 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>
Mon, 24 Sep 2012 06:41:30 +0000 (16:41 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 24 Sep 2012 06:41:30 +0000 (16:41 +1000)
commit1bc076e72b27edbe534380d948047b4568f95cc9
tree2068dc858cbe52f45affb0163b8bc6b835b34908
parent94215bb25dba2fea9c41d29300dfa64149154e02
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