Skip to content
Commit 884162df authored by NeilBrown's avatar NeilBrown
Browse files

md/raid10: decrement correct pending counter when writing to replacement.



When a write to a replacement device completes, we carefully
and correctly found the rdev that the write actually went to
and the blithely called rdev_dec_pending on the primary rdev,
even if this write was to the replacement.

This means that any writes to an array while a replacement
was ongoing would cause the nr_pending count for the primary
device to go negative, so it could never be removed.

This bug has been present since replacement was introduced in
3.3, so it is suitable for any -stable kernel since then.

Reported-by: default avatar"George Spelvin" <linux@horizon.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent e7c0c3fa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment