Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186158
b: refs/heads/master
c: ebed920
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 2, 2010
1 parent ff98668 commit 692ffc2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9fcfe0c83c3b04a759cde6b8c5f961237f17808b
refs/heads/master: ebed9203b68a4f333ce5d17e874b26c3afcfeff1
18 changes: 15 additions & 3 deletions trunk/fs/nfs/dns_resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ struct nfs_dns_ent {
};


static void nfs_dns_ent_update(struct cache_head *cnew,
struct cache_head *ckey)
{
struct nfs_dns_ent *new;
struct nfs_dns_ent *key;

new = container_of(cnew, struct nfs_dns_ent, h);
key = container_of(ckey, struct nfs_dns_ent, h);

memcpy(&new->addr, &key->addr, key->addrlen);
new->addrlen = key->addrlen;
}

static void nfs_dns_ent_init(struct cache_head *cnew,
struct cache_head *ckey)
{
Expand All @@ -49,8 +62,7 @@ static void nfs_dns_ent_init(struct cache_head *cnew,
new->hostname = kstrndup(key->hostname, key->namelen, GFP_KERNEL);
if (new->hostname) {
new->namelen = key->namelen;
memcpy(&new->addr, &key->addr, key->addrlen);
new->addrlen = key->addrlen;
nfs_dns_ent_update(cnew, ckey);
} else {
new->namelen = 0;
new->addrlen = 0;
Expand Down Expand Up @@ -234,7 +246,7 @@ static struct cache_detail nfs_dns_resolve = {
.cache_show = nfs_dns_show,
.match = nfs_dns_match,
.init = nfs_dns_ent_init,
.update = nfs_dns_ent_init,
.update = nfs_dns_ent_update,
.alloc = nfs_dns_ent_alloc,
};

Expand Down

0 comments on commit 692ffc2

Please sign in to comment.