mpathpersist: fix registration rollback issue
authorBenjamin Marzinski <bmarzins@redhat.com>
Wed, 10 Oct 2018 18:01:12 +0000 (13:01 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 12 Oct 2018 07:38:21 +0000 (09:38 +0200)
commitc595fffaa1d69efb8136d5d7f7cb55f122ff48ce
tree804eda4f7829609bfe6e27acfa4e6eaa06dd3711
parent55a2fbc730c772525a66cf2eda9c41e4e27e09c9
mpathpersist: fix registration rollback issue

When mpathpersist tries to rollback the registration, it copies
the SARK to the RK, and clears the SARK. However, it repeated this step
for each thread. This means that the first rollback thread correctly
had the RK set to the SARK used during registration. However, if more
than one registration needed to be rolled back, later threads would have
both the RK and SARK cleared. This commit fixes that by only copying and
clearing the SARK once.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
libmpathpersist/mpath_persist.c