diff options
author | Hyeonggon Yoo <42.hyeyoo@gmail.com> | 2024-12-17 00:04:43 +0900 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-25 20:22:34 -0800 |
commit | 7f0b0c6642077296edec442c6f54a4d7c608392c (patch) | |
tree | 892ffb465d499b6b562dbe3d90af349ea2055644 /mm/zpdesc.h | |
parent | 73349afa00419585c11ee232377879b1f2912881 (diff) |
mm/zsmalloc: convert __free_zspage() to use zpdesc
Introduce zpdesc_is_locked() and convert __free_zspage() to use zpdesc.
Link: https://lkml.kernel.org/r/20241216150450.1228021-13-42.hyeyoo@gmail.com
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Signed-off-by: Alex Shi <alexs@kernel.org>
Acked-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/zpdesc.h')
-rw-r--r-- | mm/zpdesc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/zpdesc.h b/mm/zpdesc.h index 193d40226188..4a4e68446f5a 100644 --- a/mm/zpdesc.h +++ b/mm/zpdesc.h @@ -165,4 +165,8 @@ static inline struct zone *zpdesc_zone(struct zpdesc *zpdesc) return page_zone(zpdesc_page(zpdesc)); } +static inline bool zpdesc_is_locked(struct zpdesc *zpdesc) +{ + return folio_test_locked(zpdesc_folio(zpdesc)); +} #endif |