diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 5912a26e041c8..72e3fb3bb0377 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -1373,6 +1373,7 @@ static void scan_block(void *_start, void *_end,
 /*
  * Scan a large memory block in MAX_SCAN_SIZE chunks to reduce the latency.
  */
+#ifdef CONFIG_SMP
 static void scan_large_block(void *start, void *end)
 {
 	void *next;
@@ -1384,6 +1385,7 @@ static void scan_large_block(void *start, void *end)
 		cond_resched();
 	}
 }
+#endif
 
 /*
  * Scan a memory block corresponding to a kmemleak_object. A condition is