summaryrefslogtreecommitdiff
path: root/include/linux/net_mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/net_mm.h')
-rw-r--r--include/linux/net_mm.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/net_mm.h b/include/linux/net_mm.h
new file mode 100644
index 000000000000..b298998bd5a0
--- /dev/null
+++ b/include/linux/net_mm.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#ifdef CONFIG_MMU
+
+#ifdef CONFIG_INET
+extern const struct vm_operations_struct tcp_vm_ops;
+static inline bool vma_is_tcp(const struct vm_area_struct *vma)
+{
+ return vma->vm_ops == &tcp_vm_ops;
+}
+#else
+static inline bool vma_is_tcp(const struct vm_area_struct *vma)
+{
+ return false;
+}
+#endif /* CONFIG_INET*/
+
+#endif /* CONFIG_MMU */