aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-02-12 03:53:33 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:35 -0500
commit2442222283918c2d1c20ae651d95fe168757938b (patch)
treef4e120320c5b9538b4626e576fce67db201c4cc7 /net
parentad06e4bd62351bc569cca0f25d68c58dbd298146 (diff)
[PATCH] knfsd: SUNRPC: Use sockaddr_storage to store address in svc_deferred_req
Sockaddr_storage will allow us to store arbitrary socket addresses in the svc_deferred_req struct. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Aurelien Charbon <aurelien.charbon@ext.bull.net> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/svcsock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 08de328ce433..6680e0f0560d 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -1785,7 +1785,8 @@ svc_defer(struct cache_req *req)
1785 1785
1786 dr->handle.owner = rqstp->rq_server; 1786 dr->handle.owner = rqstp->rq_server;
1787 dr->prot = rqstp->rq_prot; 1787 dr->prot = rqstp->rq_prot;
1788 dr->addr = rqstp->rq_addr; 1788 memcpy(&dr->addr, &rqstp->rq_addr, rqstp->rq_addrlen);
1789 dr->addrlen = rqstp->rq_addrlen;
1789 dr->daddr = rqstp->rq_daddr; 1790 dr->daddr = rqstp->rq_daddr;
1790 dr->argslen = rqstp->rq_arg.len >> 2; 1791 dr->argslen = rqstp->rq_arg.len >> 2;
1791 memcpy(dr->args, rqstp->rq_arg.head[0].iov_base-skip, dr->argslen<<2); 1792 memcpy(dr->args, rqstp->rq_arg.head[0].iov_base-skip, dr->argslen<<2);
@@ -1809,7 +1810,8 @@ static int svc_deferred_recv(struct svc_rqst *rqstp)
1809 rqstp->rq_arg.page_len = 0; 1810 rqstp->rq_arg.page_len = 0;
1810 rqstp->rq_arg.len = dr->argslen<<2; 1811 rqstp->rq_arg.len = dr->argslen<<2;
1811 rqstp->rq_prot = dr->prot; 1812 rqstp->rq_prot = dr->prot;
1812 rqstp->rq_addr = dr->addr; 1813 memcpy(&rqstp->rq_addr, &dr->addr, dr->addrlen);
1814 rqstp->rq_addrlen = dr->addrlen;
1813 rqstp->rq_daddr = dr->daddr; 1815 rqstp->rq_daddr = dr->daddr;
1814 rqstp->rq_respages = rqstp->rq_pages; 1816 rqstp->rq_respages = rqstp->rq_pages;
1815 return dr->argslen<<2; 1817 return dr->argslen<<2;