diff --git a/lnet/selftest/selftest.h b/lnet/selftest/selftest.h
index f27106ed5dd5dbb26123743dfa3f495e3a4f1df6..9e9fb6753928288fb074e77d1e9f9719462352e5 100644
--- a/lnet/selftest/selftest.h
+++ b/lnet/selftest/selftest.h
@@ -10,12 +10,11 @@
 
 #define LNET_ONLY
 
+#include <libcfs/kp30.h>
+#include <libcfs/libcfs.h>
 #ifndef __KERNEL__
 #include <liblustre.h> /* userland spinlock_t and atomic_t */
 #endif
-
-#include <libcfs/kp30.h>
-#include <libcfs/libcfs.h>
 #include <lnet/lnet.h>
 #include <lnet/lib-lnet.h>
 #include <lnet/lib-types.h>