aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/module/zfs/arc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/module/zfs/arc.c')
-rw-r--r--sys/contrib/openzfs/module/zfs/arc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/contrib/openzfs/module/zfs/arc.c b/sys/contrib/openzfs/module/zfs/arc.c
index dbb5e942e2e6..48bf99f1aeb7 100644
--- a/sys/contrib/openzfs/module/zfs/arc.c
+++ b/sys/contrib/openzfs/module/zfs/arc.c
@@ -8548,7 +8548,7 @@ l2arc_dev_get_next(void)
* of cache devices (l2arc_dev_mtx). Once a device has been selected,
* both locks will be dropped and a spa config lock held instead.
*/
- mutex_enter(&spa_namespace_lock);
+ spa_namespace_enter(FTAG);
mutex_enter(&l2arc_dev_mtx);
/* if there are no vdevs, there is nothing to do */
@@ -8591,7 +8591,7 @@ out:
*/
if (next != NULL)
spa_config_enter(next->l2ad_spa, SCL_L2ARC, next, RW_READER);
- mutex_exit(&spa_namespace_lock);
+ spa_namespace_exit(FTAG);
return (next);
}
@@ -10231,7 +10231,7 @@ l2arc_stop(void)
void
l2arc_spa_rebuild_start(spa_t *spa)
{
- ASSERT(MUTEX_HELD(&spa_namespace_lock));
+ ASSERT(spa_namespace_held());
/*
* Locate the spa's l2arc devices and kick off rebuild threads.
@@ -10256,7 +10256,7 @@ l2arc_spa_rebuild_start(spa_t *spa)
void
l2arc_spa_rebuild_stop(spa_t *spa)
{
- ASSERT(MUTEX_HELD(&spa_namespace_lock) ||
+ ASSERT(spa_namespace_held() ||
spa->spa_export_thread == curthread);
for (int i = 0; i < spa->spa_l2cache.sav_count; i++) {