hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/mm/zpool.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * zpool memory storage api
34 *
....@@ -238,6 +239,22 @@
238239 }
239240
240241 /**
242
+ * zpool_malloc_support_movable() - Check if the zpool supports
243
+ * allocating movable memory
244
+ * @zpool: The zpool to check
245
+ *
246
+ * This returns if the zpool supports allocating movable memory.
247
+ *
248
+ * Implementations must guarantee this to be thread-safe.
249
+ *
250
+ * Returns: true if the zpool supports allocating movable memory, false if not
251
+ */
252
+bool zpool_malloc_support_movable(struct zpool *zpool)
253
+{
254
+ return zpool->driver->malloc_support_movable;
255
+}
256
+
257
+/**
241258 * zpool_malloc() - Allocate memory
242259 * @zpool: The zpool to allocate from.
243260 * @size: The amount of memory to allocate.