]> git.hungrycats.org Git - linux/commitdiff
[PATCH] PATCH - kNFSd - More small fixes for TCP nfsd
authorNeil Brown <neilb@cse.unsw.edu.au>
Fri, 30 Aug 2002 09:00:00 +0000 (02:00 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 30 Aug 2002 09:00:00 +0000 (02:00 -0700)
sk_inuse should be bigger than "char" as we can
have more than 255 server threads.  Due to the way the count
is used, this is unlikely to actually cause a problem, but it
should nonetheless be fixed.

Also, two printk generate more noise than we would like,
so turn them into dprintk (debugging printk).

include/linux/sunrpc/svcsock.h
net/sunrpc/svcsock.c

index 34cbc22c0732cf870ff5c994f8d029430328595e..af29406521bc8a16436c3bb21a6ebfa8c2c72b52 100644 (file)
@@ -21,7 +21,7 @@ struct svc_sock {
        struct sock *           sk_sk;          /* INET layer */
 
        struct svc_serv *       sk_server;      /* service for this socket */
-       unsigned char           sk_inuse;       /* use count */
+       unsigned int            sk_inuse;       /* use count */
        unsigned long           sk_flags;
 #define        SK_BUSY         0                       /* enqueued/receiving */
 #define        SK_CONN         1                       /* conn pending */
index beae83f5566d487d01a906672b6b7f424071cfeb..bc40737a52036f5c3ccea43121be159f7be2de37 100644 (file)
@@ -703,11 +703,10 @@ svc_tcp_accept(struct svc_sock *svsk)
         * tell us anything. For now just warn about unpriv connections.
         */
        if (ntohs(sin.sin_port) >= 1024) {
-               if (net_ratelimit())
-                       printk(KERN_WARNING
-                                  "%s: connect from unprivileged port: %u.%u.%u.%u:%d\n",
-                                  serv->sv_name, 
-                                  NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port));
+               dprintk(KERN_WARNING
+                       "%s: connect from unprivileged port: %u.%u.%u.%u:%d\n",
+                       serv->sv_name, 
+                       NIPQUAD(sin.sin_addr.s_addr), ntohs(sin.sin_port));
        }
 
        dprintk("%s: connect from %u.%u.%u.%u:%04x\n", serv->sv_name,
@@ -1286,7 +1285,7 @@ svc_delete_socket(struct svc_sock *svsk)
                kfree(svsk);
        } else {
                spin_unlock_bh(&serv->sv_lock);
-               printk(KERN_NOTICE "svc: server socket destroy delayed\n");
+               dprintk(KERN_NOTICE "svc: server socket destroy delayed\n");
                /* svsk->sk_server = NULL; */
        }
 }