Error path in metaslab_load_impl() forgets to drop ms_sync_lock

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Giuseppe Di Natale <guss80@gmail.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Closes #8444
This commit is contained in:
Serapheim Dimitropoulos 2019-02-25 11:08:52 -08:00 committed by Brian Behlendorf
parent c44a3ec059
commit 8eef997679

View File

@ -1682,8 +1682,10 @@ metaslab_load_impl(metaslab_t *msp)
mutex_enter(&msp->ms_lock);
ASSERT(!msp->ms_condensing);
if (error != 0)
if (error != 0) {
mutex_exit(&msp->ms_sync_lock);
return (error);
}
ASSERT3P(msp->ms_group, !=, NULL);
msp->ms_loaded = B_TRUE;