[PATCH] knfsd: SUNRPC: Cache remote peer's address in svc_sock

The remote peer's address won't change after the socket has been accepted.  We
don't need to call ->getname on every incoming request.

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>
This commit is contained in:
Chuck Lever
2007-02-12 00:53:30 -08:00
committed by Linus Torvalds
parent e79eff1f90
commit 067d781731
2 changed files with 11 additions and 6 deletions

View File

@@ -57,6 +57,9 @@ struct svc_sock {
/* cache of various info for TCP sockets */
void *sk_info_authunix;
struct sockaddr_storage sk_remote; /* remote peer's address */
int sk_remotelen; /* length of address */
};
/*