diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index bc52f53e604cc5f215224659a5527abd311a9877..5da61183e806f43b44c4a68c1d2abda11e9f9394 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -5939,10 +5939,10 @@ buf_page_io_complete(buf_page_t* bpage, bool dblwr, bool evict)
 		}
 
 		if (bpage->zip.data && uncompressed) {
-			my_atomic_addlint(&buf_pool->n_pend_unzip, 1);
+			buf_pool->n_pend_unzip++;
 			ibool ok = buf_zip_decompress((buf_block_t*) bpage,
 						      FALSE);
-			my_atomic_addlint(&buf_pool->n_pend_unzip, ulint(-1));
+			buf_pool->n_pend_unzip--;
 
 			if (!ok) {
 				ib::info() << "Page "
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index 0f8bbea352785eb6c12574d5099d28bd75cfadd4..d4157fbd0400f7037f475896cd17e4030972b9f0 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -2082,7 +2082,8 @@ struct buf_pool_t{
 					indexed by block->frame */
 	ulint		n_pend_reads;	/*!< number of pending read
 					operations */
-	ulint		n_pend_unzip;	/*!< number of pending decompressions */
+	Atomic_counter<ulint>
+			n_pend_unzip;	/*!< number of pending decompressions */
 
 	time_t		last_printout_time;
 					/*!< when buf_print_io was last time