diff options
Diffstat (limited to 'fs/nfsd/nfsproc.c')
-rw-r--r-- | fs/nfsd/nfsproc.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index 54c6b3d3cc79..b8680738f588 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c | |||
@@ -403,12 +403,13 @@ nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp, | |||
403 | 403 | ||
404 | fh_init(&newfh, NFS_FHSIZE); | 404 | fh_init(&newfh, NFS_FHSIZE); |
405 | /* | 405 | /* |
406 | * Create the link, look up new file and set attrs. | 406 | * Crazy hack: the request fits in a page, and already-decoded |
407 | * attributes follow argp->tname, so it's safe to just write a | ||
408 | * null to ensure it's null-terminated: | ||
407 | */ | 409 | */ |
410 | argp->tname[argp->tlen] = '\0'; | ||
408 | nfserr = nfsd_symlink(rqstp, &argp->ffh, argp->fname, argp->flen, | 411 | nfserr = nfsd_symlink(rqstp, &argp->ffh, argp->fname, argp->flen, |
409 | argp->tname, argp->tlen, | 412 | argp->tname, &newfh); |
410 | &newfh, &argp->attrs); | ||
411 | |||
412 | 413 | ||
413 | fh_put(&argp->ffh); | 414 | fh_put(&argp->ffh); |
414 | fh_put(&newfh); | 415 | fh_put(&newfh); |
@@ -716,6 +717,7 @@ nfserrno (int errno) | |||
716 | { nfserr_noent, -ENOENT }, | 717 | { nfserr_noent, -ENOENT }, |
717 | { nfserr_io, -EIO }, | 718 | { nfserr_io, -EIO }, |
718 | { nfserr_nxio, -ENXIO }, | 719 | { nfserr_nxio, -ENXIO }, |
720 | { nfserr_fbig, -E2BIG }, | ||
719 | { nfserr_acces, -EACCES }, | 721 | { nfserr_acces, -EACCES }, |
720 | { nfserr_exist, -EEXIST }, | 722 | { nfserr_exist, -EEXIST }, |
721 | { nfserr_xdev, -EXDEV }, | 723 | { nfserr_xdev, -EXDEV }, |
@@ -743,6 +745,7 @@ nfserrno (int errno) | |||
743 | { nfserr_notsupp, -EOPNOTSUPP }, | 745 | { nfserr_notsupp, -EOPNOTSUPP }, |
744 | { nfserr_toosmall, -ETOOSMALL }, | 746 | { nfserr_toosmall, -ETOOSMALL }, |
745 | { nfserr_serverfault, -ESERVERFAULT }, | 747 | { nfserr_serverfault, -ESERVERFAULT }, |
748 | { nfserr_serverfault, -ENFILE }, | ||
746 | }; | 749 | }; |
747 | int i; | 750 | int i; |
748 | 751 | ||
@@ -750,7 +753,7 @@ nfserrno (int errno) | |||
750 | if (nfs_errtbl[i].syserr == errno) | 753 | if (nfs_errtbl[i].syserr == errno) |
751 | return nfs_errtbl[i].nfserr; | 754 | return nfs_errtbl[i].nfserr; |
752 | } | 755 | } |
753 | printk (KERN_INFO "nfsd: non-standard errno: %d\n", errno); | 756 | WARN(1, "nfsd: non-standard errno: %d\n", errno); |
754 | return nfserr_io; | 757 | return nfserr_io; |
755 | } | 758 | } |
756 | 759 | ||