]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: Don't release reference to device while handling read error.
authorNeilBrown <neilb@suse.de>
Thu, 11 Oct 2012 02:44:30 +0000 (13:44 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 11 Oct 2012 02:44:30 +0000 (13:44 +1100)
commitc1e8d953ce2f93275a5131db330aa9df4119919c
tree9a93ab26f6354988241dc003a9ab16b77a3d75d3
parent60b1f4e04bd091b9880626eeb90ec51adbae2197
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