summaryrefslogtreecommitdiffstats
path: root/module/zfs
diff options
context:
space:
mode:
authorSerapheim Dimitropoulos <[email protected]>2019-02-25 11:08:52 -0800
committerBrian Behlendorf <[email protected]>2019-02-25 11:08:52 -0800
commit8eef997679ba54547f7d361553d21b3291f41ae7 (patch)
tree3c79892802578e13395e48624ea96bedf063d626 /module/zfs
parentc44a3ec0596d574f2eb7f57ff97720cd63c4a61e (diff)
Error path in metaslab_load_impl() forgets to drop ms_sync_lock
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Serapheim Dimitropoulos <[email protected]> Closes #8444
Diffstat (limited to 'module/zfs')
-rw-r--r--module/zfs/metaslab.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/zfs/metaslab.c b/module/zfs/metaslab.c
index 9f6f0048f..8380897a9 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;