-
-static inline int expkey_match (struct cache_head *a, struct cache_head *b)
-{
- struct svc_expkey *orig = container_of(a, struct svc_expkey, h);
- struct svc_expkey *new = container_of(b, struct svc_expkey, h);
-
- if (orig->ek_fsidtype != new->ek_fsidtype ||
- orig->ek_client != new->ek_client ||
- memcmp(orig->ek_fsid, new->ek_fsid, key_len(orig->ek_fsidtype)) != 0)
- return 0;
- return 1;
-}
-
-static inline void expkey_init(struct cache_head *cnew,
- struct cache_head *citem)
-{
- struct svc_expkey *new = container_of(cnew, struct svc_expkey, h);
- struct svc_expkey *item = container_of(citem, struct svc_expkey, h);
-
- kref_get(&item->ek_client->ref);
- new->ek_client = item->ek_client;
- new->ek_fsidtype = item->ek_fsidtype;
- new->ek_fsid[0] = item->ek_fsid[0];
- new->ek_fsid[1] = item->ek_fsid[1];
- new->ek_fsid[2] = item->ek_fsid[2];
-}
-
-static inline void expkey_update(struct cache_head *cnew,
- struct cache_head *citem)
-{
- struct svc_expkey *new = container_of(cnew, struct svc_expkey, h);
- struct svc_expkey *item = container_of(citem, struct svc_expkey, h);
-
- new->ek_mnt = mntget(item->ek_mnt);
- new->ek_dentry = dget(item->ek_dentry);
-}
-
-static struct cache_head *expkey_alloc(void)
-{
- struct svc_expkey *i = kmalloc(sizeof(*i), GFP_KERNEL);
- if (i)
- return &i->h;
- else
- return NULL;
-}
-
-static struct cache_detail svc_expkey_cache = {