看到mm/zswap.c如下定义:
代码: 全选
static const struct zpool_ops zswap_zpool_ops = {
.evict = zswap_writeback_entry
};
代码: 全选
static int zswap_writeback_entry(struct zpool *pool, unsigned long handle)
而且static声明,其它文件能看到吗?不能看到,那它是谁调用的?
貌似是创建pool时用指针传到外部的
Wed May 4 17:52:08 CST 2016补充:
代码: 全选
static int zbud_zpool_evict(struct zbud_pool *pool, unsigned long handle)
{
if (pool->zpool && pool->zpool_ops && pool->zpool_ops->evict)
return pool->zpool_ops->evict(pool->zpool, handle);
else
return -ENOENT;
}
static const struct zbud_ops zbud_zpool_ops = {
.evict = zbud_zpool_evict
};