SUNRPC/NFSD: Remove using of dprintk with KERN_WARNING
authorKinglong Mee <kinglongmee@gmail.com>
Thu, 29 May 2014 04:18:52 +0000 (12:18 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Sat, 31 May 2014 00:25:28 +0000 (20:25 -0400)
When debugging, rpc prints messages from dprintk(KERN_WARNING ...)
with "^A4" prefixed,

[ 2780.339988] ^A4nfsd: connect from unprivileged port: 127.0.0.1, port=35316

Trond tells,
> dprintk != printk. We have NEVER supported dprintk(KERN_WARNING...)

This patch removes using of dprintk with KERN_WARNING.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfsfh.c
net/sunrpc/svcsock.c

index a337106d687523e59ce39d21feeb70a1c1ef7e0a..ec839341815477097f38ac6a5e81fb5738236697 100644 (file)
@@ -88,9 +88,8 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp,
        /* Check if the request originated from a secure port. */
        if (!rqstp->rq_secure && !(flags & NFSEXP_INSECURE_PORT)) {
                RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
-               dprintk(KERN_WARNING
-                      "nfsd: request from insecure port %s!\n",
-                      svc_print_addr(rqstp, buf, sizeof(buf)));
+               dprintk("nfsd: request from insecure port %s!\n",
+                       svc_print_addr(rqstp, buf, sizeof(buf)));
                return nfserr_perm;
        }
 
index f3b8eb309d014a30e014ec4bac30266a38203627..b507cd327d9b802d6b6c6dba7376dee571142b47 100644 (file)
@@ -849,8 +849,7 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt)
         * tell us anything.  For now just warn about unpriv connections.
         */
        if (!svc_port_is_privileged(sin)) {
-               dprintk(KERN_WARNING
-                       "%s: connect from unprivileged port: %s\n",
+               dprintk("%s: connect from unprivileged port: %s\n",
                        serv->sv_name,
                        __svc_print_addr(sin, buf, sizeof(buf)));
        }