diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index f64fd6f04c9..aab17d808c2 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -984,7 +984,7 @@ void dict_sys_t::lock_wait(SRW_LOCK_ARGS(const char *file, unsigned line))
   if (latch_ex_wait_start.compare_exchange_strong
       (old, now, std::memory_order_relaxed, std::memory_order_relaxed))
   {
-    latch.wr_lock(SRW_LOCK_ARGS(file, line));
+    latch.x_lock(SRW_LOCK_ARGS(file, line));
     latch_ex_wait_start.store(0, std::memory_order_relaxed);
     ut_ad(!latch_readers);
     ut_ad(!latch_ex);
@@ -1003,7 +1003,7 @@ void dict_sys_t::lock_wait(SRW_LOCK_ARGS(const char *file, unsigned line))
   if (waited > threshold / 4)
     ib::warn() << "A long wait (" << waited
                << " seconds) was observed for dict_sys.latch";
-  latch.wr_lock(SRW_LOCK_ARGS(file, line));
+  latch.x_lock(SRW_LOCK_ARGS(file, line));
   ut_ad(!latch_readers);
   ut_ad(!latch_ex);
   ut_d(latch_ex= true);
@@ -4654,7 +4658,7 @@ void dict_sys_t::close()
   temp_id_hash.free();
 
   unlock();
-  latch.destroy();
+  latch.free();
 
   mysql_mutex_destroy(&dict_foreign_err_mutex);
 
diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h
index a02f4761964..1b9f23666ce 100644
--- a/storage/innobase/include/dict0dict.h
+++ b/storage/innobase/include/dict0dict.h
@@ -1354,7 +1354,7 @@ class dict_sys_t
   std::atomic<ulonglong> latch_ex_wait_start;
 
   /** the rw-latch protecting the data dictionary cache */
-  MY_ALIGNED(CACHE_LINE_SIZE) srw_lock latch;
+  MY_ALIGNED(CACHE_LINE_SIZE) index_lock latch;
 #ifdef UNIV_DEBUG
   /** whether latch is being held in exclusive mode (by any thread) */
   bool latch_ex;
@@ -1562,7 +1562,7 @@ class dict_sys_t
   /** Exclusively lock the dictionary cache. */
   void lock(SRW_LOCK_ARGS(const char *file, unsigned line))
   {
-    if (latch.wr_lock_try())
+    if (latch.x_lock_try())
     {
       ut_ad(!latch_readers);
       ut_ad(!latch_ex);
@@ -1586,12 +1586,12 @@ class dict_sys_t
     ut_ad(latch_ex);
     ut_ad(!latch_readers);
     ut_d(latch_ex= false);
-    latch.wr_unlock();
+    latch.x_unlock();
   }
   /** Acquire a shared lock on the dictionary cache. */
   void freeze()
   {
-    latch.rd_lock();
+    latch.s_lock();
     ut_ad(!latch_ex);
     ut_d(latch_readers++);
   }
@@ -1600,7 +1600,7 @@ class dict_sys_t
   {
     ut_ad(!latch_ex);
     ut_ad(latch_readers--);
-    latch.rd_unlock();
+    latch.s_unlock();
   }
 #endif
 
