From 8eef997679ba54547f7d361553d21b3291f41ae7 Mon Sep 17 00:00:00 2001 From: Serapheim Dimitropoulos Date: Mon, 25 Feb 2019 11:08:52 -0800 Subject: [PATCH] Error path in metaslab_load_impl() forgets to drop ms_sync_lock Reviewed-by: Brian Behlendorf Reviewed-by: Giuseppe Di Natale Reviewed-by: George Melikov Signed-off-by: Serapheim Dimitropoulos Closes #8444 --- module/zfs/metaslab.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c index 9f6f0048fc..8380897a9d 100644 --- a/module/zfs/metaslab.c +++ b/module/zfs/metaslab.c @@ -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;