Merge pull request #155 from arutk/fix_vfree

Fix cas_vfree
This commit is contained in:
Michał Mielewczyk
2019-10-18 16:26:00 +02:00
committed by GitHub

View File

@@ -3,10 +3,12 @@
* SPDX-License-Identifier: BSD-3-Clause-Clear
*/
#include "cas_cache.h"
#include "utils_gc.h"
#include <linux/vmalloc.h>
#if defined (CAS_GARBAGE_COLLECTOR)
struct cas_vfree_item {
struct llist_head list;
struct work_struct ws;
@@ -35,6 +37,9 @@ void cas_vfree(const void *addr)
{
struct cas_vfree_item *item = this_cpu_ptr(&cas_vfree_item);
if (!addr)
return;
atomic_inc(&freed);
if (llist_add((struct llist_node *)addr, &item->list))