]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/nfsd/nfsproc.c
Merge tag 'trace-ipi-tracepoints' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-bionic-kernel.git] / fs / nfsd / nfsproc.c
index 54c6b3d3cc79b399071a9d8c279fecb415fd5453..b8680738f5884e7ee94d46c95c89ff68faa9a95f 100644 (file)
@@ -403,12 +403,13 @@ nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp,
 
        fh_init(&newfh, NFS_FHSIZE);
        /*
-        * Create the link, look up new file and set attrs.
+        * Crazy hack: the request fits in a page, and already-decoded
+        * attributes follow argp->tname, so it's safe to just write a
+        * null to ensure it's null-terminated:
         */
+       argp->tname[argp->tlen] = '\0';
        nfserr = nfsd_symlink(rqstp, &argp->ffh, argp->fname, argp->flen,
-                                                argp->tname, argp->tlen,
-                                                &newfh, &argp->attrs);
-
+                                                argp->tname, &newfh);
 
        fh_put(&argp->ffh);
        fh_put(&newfh);
@@ -716,6 +717,7 @@ nfserrno (int errno)
                { nfserr_noent, -ENOENT },
                { nfserr_io, -EIO },
                { nfserr_nxio, -ENXIO },
+               { nfserr_fbig, -E2BIG },
                { nfserr_acces, -EACCES },
                { nfserr_exist, -EEXIST },
                { nfserr_xdev, -EXDEV },
@@ -743,6 +745,7 @@ nfserrno (int errno)
                { nfserr_notsupp, -EOPNOTSUPP },
                { nfserr_toosmall, -ETOOSMALL },
                { nfserr_serverfault, -ESERVERFAULT },
+               { nfserr_serverfault, -ENFILE },
        };
        int     i;
 
@@ -750,7 +753,7 @@ nfserrno (int errno)
                if (nfs_errtbl[i].syserr == errno)
                        return nfs_errtbl[i].nfserr;
        }
-       printk (KERN_INFO "nfsd: non-standard errno: %d\n", errno);
+       WARN(1, "nfsd: non-standard errno: %d\n", errno);
        return nfserr_io;
 }