[PATCH 5.2 294/313] md: only call set_in_sync() when it is expected to succeed.