From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 20 Feb 2024 01:20:52 +0000 Subject: [PATCH] add new system file --- kernel/mm/zpool.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/kernel/mm/zpool.c b/kernel/mm/zpool.c index 01a771e..3744a2d 100644 --- a/kernel/mm/zpool.c +++ b/kernel/mm/zpool.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * zpool memory storage api * @@ -238,6 +239,22 @@ } /** + * zpool_malloc_support_movable() - Check if the zpool supports + * allocating movable memory + * @zpool: The zpool to check + * + * This returns if the zpool supports allocating movable memory. + * + * Implementations must guarantee this to be thread-safe. + * + * Returns: true if the zpool supports allocating movable memory, false if not + */ +bool zpool_malloc_support_movable(struct zpool *zpool) +{ + return zpool->driver->malloc_support_movable; +} + +/** * zpool_malloc() - Allocate memory * @zpool: The zpool to allocate from. * @size: The amount of memory to allocate. -- Gitblit v1.6.2