[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:
committed by
Linus Torvalds
parent
e79eff1f90
commit
067d781731
@@ -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 */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user