Merge tag 'for-5.6/io_uring-vfs-2020-01-29' of git://git.kernel.dk/linux-block
[sfrench/cifs-2.6.git] / include / linux / mm.h
index b4ba5b3bb54b4366f1ae696380103a8ee26ab79b..1233bf45164d76f678cac16c1907137b390a589b 100644 (file)
@@ -625,24 +625,19 @@ unsigned long vmalloc_to_pfn(const void *addr);
  * On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there
  * is no special casing required.
  */
-static inline bool is_vmalloc_addr(const void *x)
-{
-#ifdef CONFIG_MMU
-       unsigned long addr = (unsigned long)x;
-
-       return addr >= VMALLOC_START && addr < VMALLOC_END;
-#else
-       return false;
-#endif
-}
 
 #ifndef is_ioremap_addr
 #define is_ioremap_addr(x) is_vmalloc_addr(x)
 #endif
 
 #ifdef CONFIG_MMU
+extern bool is_vmalloc_addr(const void *x);
 extern int is_vmalloc_or_module_addr(const void *x);
 #else
+static inline bool is_vmalloc_addr(const void *x)
+{
+       return false;
+}
 static inline int is_vmalloc_or_module_addr(const void *x)
 {
        return 0;