aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2007-02-12 03:53:32 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:35 -0500
commitad06e4bd62351bc569cca0f25d68c58dbd298146 (patch)
tree82024c01e61de32af17d3b67eac0bb93138a2954 /fs/lockd/svc.c
parent1ba951053f07187f6e77be664a4b6f8bf0ba7ae4 (diff)
[PATCH] knfsd: SUNRPC: Add a function to format the address in an svc_rqst for printing
There are loads of places where the RPC server assumes that the rq_addr fields contains an IPv4 address. Top among these are error and debugging messages that display the server's IP address. Let's refactor the address printing into a separate function that's smart enough to figure out the difference between IPv4 and IPv6 addresses. 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 'fs/lockd/svc.c')
-rw-r--r--fs/lockd/svc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 2c3d5ac4a3b6..80fcacc1acf9 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -141,6 +141,7 @@ lockd(struct svc_rqst *rqstp)
141 */ 141 */
142 while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) { 142 while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) {
143 long timeout = MAX_SCHEDULE_TIMEOUT; 143 long timeout = MAX_SCHEDULE_TIMEOUT;
144 char buf[RPC_MAX_ADDRBUFLEN];
144 145
145 if (signalled()) { 146 if (signalled()) {
146 flush_signals(current); 147 flush_signals(current);
@@ -175,11 +176,10 @@ lockd(struct svc_rqst *rqstp)
175 break; 176 break;
176 } 177 }
177 178
178 dprintk("lockd: request from %08x\n", 179 dprintk("lockd: request from %s\n",
179 (unsigned)ntohl(rqstp->rq_addr.sin_addr.s_addr)); 180 svc_print_addr(rqstp, buf, sizeof(buf)));
180 181
181 svc_process(rqstp); 182 svc_process(rqstp);
182
183 } 183 }
184 184
185 flush_signals(current); 185 flush_signals(current);