]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/nfsd/nfs4xdr.c
Merge branch 'linux-2.6'
[mv-sheeva.git] / fs / nfsd / nfs4xdr.c
index fbb4af969243f86051db2c0571fcee0677c85f5e..15809dfd88a594d64d258f98aff7941a878a8be0 100644 (file)
@@ -44,7 +44,6 @@
 
 #include <linux/param.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/fs.h>
 #include <linux/namei.h>
 #include <linux/vfs.h>
@@ -199,24 +198,22 @@ defer_free(struct nfsd4_compoundargs *argp,
 
 static char *savemem(struct nfsd4_compoundargs *argp, __be32 *p, int nbytes)
 {
-       void *new = NULL;
        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);
        } else {
                BUG_ON(p != argp->tmpp);
                argp->tmpp = NULL;
        }
        if (defer_free(argp, kfree, p)) {
-               kfree(new);
+               kfree(p);
                return NULL;
        } else
                return (char *)p;
 }
 
-
 static __be32
 nfsd4_decode_bitmap(struct nfsd4_compoundargs *argp, u32 *bmval)
 {
@@ -255,7 +252,7 @@ nfsd4_decode_fattr(struct nfsd4_compoundargs *argp, u32 *bmval, struct iattr *ia
                return status;
 
        /*
-        * According to spec, unsupported attributes return ERR_NOTSUPP;
+        * According to spec, unsupported attributes return ERR_ATTRNOTSUPP;
         * read-only attributes return ERR_INVAL.
         */
        if ((bmval[0] & ~NFSD_SUPPORTED_ATTRS_WORD0) || (bmval[1] & ~NFSD_SUPPORTED_ATTRS_WORD1))