|
@@ -199,24 +199,22 @@ defer_free(struct nfsd4_compoundargs *argp,
|
|
|
|
|
|
static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes)
|
|
static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes)
|
|
{
|
|
{
|
|
- void *new = NULL;
|
|
|
|
if (p == argp->tmp) {
|
|
if (p == argp->tmp) {
|
|
- new = kmalloc(nbytes, GFP_KERNEL);
|
|
|
|
- if (!new) return NULL;
|
|
|
|
- p = new;
|
|
|
|
|
|
+ p = kmalloc(nbytes, GFP_KERNEL);
|
|
|
|
+ if (!p)
|
|
|
|
+ return NULL;
|
|
memcpy(p, argp->tmp, nbytes);
|
|
memcpy(p, argp->tmp, nbytes);
|
|
} else {
|
|
} else {
|
|
BUG_ON(p != argp->tmpp);
|
|
BUG_ON(p != argp->tmpp);
|
|
argp->tmpp = NULL;
|
|
argp->tmpp = NULL;
|
|
}
|
|
}
|
|
if (defer_free(argp, kfree, p)) {
|
|
if (defer_free(argp, kfree, p)) {
|
|
- kfree(new);
|
|
|
|
|
|
+ kfree(p);
|
|
return NULL;
|
|
return NULL;
|
|
} else
|
|
} else
|
|
return (char *)p;
|
|
return (char *)p;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
static __be32
|
|
static __be32
|
|
nfsd4_decode_bitmap(struct nfsd4_compoundargs *argp, u32 *bmval)
|
|
nfsd4_decode_bitmap(struct nfsd4_compoundargs *argp, u32 *bmval)
|
|
{
|
|
{
|