]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/lockd/svc.c
MMC: OMAP: Move failing command abortion to workqueue
[linux-2.6-omap-h63xx.git] / fs / lockd / svc.c
index 470af0138bb58839703770b7b41558a098c94eb5..1ed8bd4de94143784080a98de6db2cbe3904368c 100644 (file)
@@ -153,7 +153,7 @@ lockd(struct svc_rqst *rqstp)
         */
        while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) {
                long timeout = MAX_SCHEDULE_TIMEOUT;
-               char buf[RPC_MAX_ADDRBUFLEN];
+               RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]);
 
                if (signalled()) {
                        flush_signals(current);
@@ -227,17 +227,25 @@ lockd(struct svc_rqst *rqstp)
 static int make_socks(struct svc_serv *serv, int proto)
 {
        static int warned;
+       struct svc_xprt *xprt;
        int err = 0;
 
-       if (proto == IPPROTO_UDP || nlm_udpport)
-               if (!svc_find_xprt(serv, "udp", 0, 0))
+       if (proto == IPPROTO_UDP || nlm_udpport) {
+               xprt = svc_find_xprt(serv, "udp", 0, 0);
+               if (!xprt)
                        err = svc_create_xprt(serv, "udp", nlm_udpport,
                                              SVC_SOCK_DEFAULTS);
-       if (err >= 0 && (proto == IPPROTO_TCP || nlm_tcpport))
-               if (!svc_find_xprt(serv, "tcp", 0, 0))
+               else
+                       svc_xprt_put(xprt);
+       }
+       if (err >= 0 && (proto == IPPROTO_TCP || nlm_tcpport)) {
+               xprt = svc_find_xprt(serv, "tcp", 0, 0);
+               if (!xprt)
                        err = svc_create_xprt(serv, "tcp", nlm_tcpport,
                                              SVC_SOCK_DEFAULTS);
-
+               else
+                       svc_xprt_put(xprt);
+       }
        if (err >= 0) {
                warned = 0;
                err = 0;