nilfs2: fix missing zero-fill initialization of btree node cache
[safe/jmp/linux-2.6] / fs / lockd / xdr4.c
index 846fc1d..ad9dbbc 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <linux/types.h>
 #include <linux/sched.h>
-#include <linux/utsname.h>
 #include <linux/nfs.h>
 
 #include <linux/sunrpc/xdr.h>
@@ -17,7 +16,6 @@
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/stats.h>
 #include <linux/lockd/lockd.h>
-#include <linux/lockd/sm_inter.h>
 
 #define NLMDBG_FACILITY                NLMDBG_XDR
 
@@ -64,8 +62,9 @@ nlm4_decode_cookie(__be32 *p, struct nlm_cookie *c)
        }
        else 
        {
-               printk(KERN_NOTICE
-                       "lockd: bad cookie size %d (only cookies under %d bytes are supported.)\n", len, NLM_MAXCOOKIELEN);
+               dprintk("lockd: bad cookie size %d (only cookies under "
+                       "%d bytes are supported.)\n",
+                               len, NLM_MAXCOOKIELEN);
                return NULL;
        }
        return p;
@@ -86,8 +85,7 @@ nlm4_decode_fh(__be32 *p, struct nfs_fh *f)
        memset(f->data, 0, sizeof(f->data));
        f->size = ntohl(*p++);
        if (f->size > NFS_MAXFHSIZE) {
-               printk(KERN_NOTICE
-                       "lockd: bad fhandle size %d (should be <=%d)\n",
+               dprintk("lockd: bad fhandle size %d (should be <=%d)\n",
                        f->size, NFS_MAXFHSIZE);
                return NULL;
        }
@@ -356,10 +354,8 @@ nlm4svc_decode_reboot(struct svc_rqst *rqstp, __be32 *p, struct nlm_reboot *argp
        if (!(p = xdr_decode_string_inplace(p, &argp->mon, &argp->len, SM_MAXSTRLEN)))
                return 0;
        argp->state = ntohl(*p++);
-       /* Preserve the address in network byte order */
-       argp->addr  = *p++;
-       argp->vers  = *p++;
-       argp->proto = *p++;
+       memcpy(&argp->priv.data, p, sizeof(argp->priv.data));
+       p += XDR_QUADLEN(SM_PRIV_SIZE);
        return xdr_argsize_check(rqstp, p);
 }