/* caller must hold the tree lock
* remove from the tree and free it, if nobody reference the entry
*/
-static void zswap_entry_put(struct zswap_tree *tree,
- struct zswap_entry *entry)
+static void zswap_entry_put(struct zswap_entry *entry)
{
int refcount = --entry->refcount;
struct zswap_entry *entry)
{
if (zswap_rb_erase(&tree->rbroot, entry))
- zswap_entry_put(tree, entry);
+ zswap_entry_put(entry);
}
static enum lru_status shrink_memcg_cb(struct list_head *item, struct list_lru_one *l,
put_unlock:
/* Drop local reference */
- zswap_entry_put(tree, entry);
+ zswap_entry_put(entry);
unlock:
spin_unlock(&tree->lock);
spin_lock(lock);
zswap_lru_del(&entry->pool->list_lru, entry);
zswap_lru_add(&entry->pool->list_lru, entry);
}
- zswap_entry_put(tree, entry);
+ zswap_entry_put(entry);
spin_unlock(&tree->lock);
return true;