diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-05 16:25:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-05 16:25:45 -0500 |
commit | cc7889ff5ee7a1c1a2b5073c53db5ad9b76f14e2 (patch) | |
tree | 647e11872abe7c20c0145de9adbb60f15085dad0 /fs/nfs/dns_resolve.c | |
parent | b13d3c6e8ab6ac53e8c1858a9c837cb6ba3bbef0 (diff) | |
parent | 3fa04ecd72780da31ba8b329e148179bc24a9c7d (diff) |
Merge branch 'nfs-for-2.6.34' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.34' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (44 commits)
NFS: Remove requirement for inode->i_mutex from nfs_invalidate_mapping
NFS: Clean up nfs_sync_mapping
NFS: Simplify nfs_wb_page()
NFS: Replace __nfs_write_mapping with sync_inode()
NFS: Simplify nfs_wb_page_cancel()
NFS: Ensure inode is always marked I_DIRTY_DATASYNC, if it has unstable pages
NFS: Run COMMIT as an asynchronous RPC call when wbc->for_background is set
NFS: Reduce the number of unnecessary COMMIT calls
NFS: Add a count of the number of unstable writes carried by an inode
NFS: Cleanup - move nfs_write_inode() into fs/nfs/write.c
nfs41 fix NFS4ERR_CLID_INUSE for exchange id
NFS: Fix an allocation-under-spinlock bug
SUNRPC: Handle EINVAL error returns from the TCP connect operation
NFSv4.1: Various fixes to the sequence flag error handling
nfs4: renewd renew operations should take/put a client reference
nfs41: renewd sequence operations should take/put client reference
nfs: prevent backlogging of renewd requests
nfs: kill renewd before clearing client minor version
NFS: Make close(2) asynchronous when closing NFS O_DIRECT files
NFS: Improve NFS iostat byte count accuracy for writes
...
Diffstat (limited to 'fs/nfs/dns_resolve.c')
-rw-r--r-- | fs/nfs/dns_resolve.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index 95e1ca765d47..3f0cd4dfddaf 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c | |||
@@ -36,6 +36,19 @@ struct nfs_dns_ent { | |||
36 | }; | 36 | }; |
37 | 37 | ||
38 | 38 | ||
39 | static void nfs_dns_ent_update(struct cache_head *cnew, | ||
40 | struct cache_head *ckey) | ||
41 | { | ||
42 | struct nfs_dns_ent *new; | ||
43 | struct nfs_dns_ent *key; | ||
44 | |||
45 | new = container_of(cnew, struct nfs_dns_ent, h); | ||
46 | key = container_of(ckey, struct nfs_dns_ent, h); | ||
47 | |||
48 | memcpy(&new->addr, &key->addr, key->addrlen); | ||
49 | new->addrlen = key->addrlen; | ||
50 | } | ||
51 | |||
39 | static void nfs_dns_ent_init(struct cache_head *cnew, | 52 | static void nfs_dns_ent_init(struct cache_head *cnew, |
40 | struct cache_head *ckey) | 53 | struct cache_head *ckey) |
41 | { | 54 | { |
@@ -49,8 +62,7 @@ static void nfs_dns_ent_init(struct cache_head *cnew, | |||
49 | new->hostname = kstrndup(key->hostname, key->namelen, GFP_KERNEL); | 62 | new->hostname = kstrndup(key->hostname, key->namelen, GFP_KERNEL); |
50 | if (new->hostname) { | 63 | if (new->hostname) { |
51 | new->namelen = key->namelen; | 64 | new->namelen = key->namelen; |
52 | memcpy(&new->addr, &key->addr, key->addrlen); | 65 | nfs_dns_ent_update(cnew, ckey); |
53 | new->addrlen = key->addrlen; | ||
54 | } else { | 66 | } else { |
55 | new->namelen = 0; | 67 | new->namelen = 0; |
56 | new->addrlen = 0; | 68 | new->addrlen = 0; |
@@ -234,7 +246,7 @@ static struct cache_detail nfs_dns_resolve = { | |||
234 | .cache_show = nfs_dns_show, | 246 | .cache_show = nfs_dns_show, |
235 | .match = nfs_dns_match, | 247 | .match = nfs_dns_match, |
236 | .init = nfs_dns_ent_init, | 248 | .init = nfs_dns_ent_init, |
237 | .update = nfs_dns_ent_init, | 249 | .update = nfs_dns_ent_update, |
238 | .alloc = nfs_dns_ent_alloc, | 250 | .alloc = nfs_dns_ent_alloc, |
239 | }; | 251 | }; |
240 | 252 | ||