summaryrefslogtreecommitdiffstats
path: root/tools/include/linux/gfp.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/include/linux/gfp.h')
-rw-r--r--tools/include/linux/gfp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/include/linux/gfp.h b/tools/include/linux/gfp.h
new file mode 100644
index 0000000000..6a10ff5f5b
--- /dev/null
+++ b/tools/include/linux/gfp.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _TOOLS_INCLUDE_LINUX_GFP_H
+#define _TOOLS_INCLUDE_LINUX_GFP_H
+
+#include <linux/types.h>
+#include <linux/gfp_types.h>
+
+static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags)
+{
+ return !!(gfp_flags & __GFP_DIRECT_RECLAIM);
+}
+
+#endif /* _TOOLS_INCLUDE_LINUX_GFP_H */