X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fnfsd%2Fnfsproc.c;h=757f9d2080340b1240443704dee70308945b0fb6;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=337c8c3bcd66d94fb64a5d5c49435450e5cf4689;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index 337c8c3bc..757f9d208 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c @@ -128,8 +128,8 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp, if (NFSSVC_MAXBLKSIZE < argp->count) { printk(KERN_NOTICE - "oversized read request from %08x:%d (%d bytes)\n", - ntohl(rqstp->rq_addr.sin_addr.s_addr), + "oversized read request from %u.%u.%u.%u:%d (%d bytes)\n", + NIPQUAD(rqstp->rq_addr.sin_addr.s_addr), ntohs(rqstp->rq_addr.sin_port), argp->count); argp->count = NFSSVC_MAXBLKSIZE; @@ -137,7 +137,7 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp, svc_reserve(rqstp, (19<<2) + argp->count + 4); resp->count = argp->count; - nfserr = nfsd_read(rqstp, fh_copy(&resp->fh, &argp->fh), + nfserr = nfsd_read(rqstp, fh_copy(&resp->fh, &argp->fh), NULL, argp->offset, argp->vec, argp->vlen, &resp->count); @@ -160,7 +160,7 @@ nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp, SVCFH_fmt(&argp->fh), argp->len, argp->offset); - nfserr = nfsd_write(rqstp, fh_copy(&resp->fh, &argp->fh), + nfserr = nfsd_write(rqstp, fh_copy(&resp->fh, &argp->fh), NULL, argp->offset, argp->vec, argp->vlen, argp->len, @@ -212,6 +212,7 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp, nfserr = fh_compose(newfhp, dirfhp->fh_export, dchild, dirfhp); if (!nfserr && !dchild->d_inode) nfserr = nfserr_noent; + dput(dchild); if (nfserr) { if (nfserr != nfserr_noent) goto out_unlock; @@ -539,7 +540,7 @@ static struct svc_procedure nfsd_procedures2[18] = { PROC(symlink, symlinkargs, void, none, RC_REPLSTAT, ST), PROC(mkdir, createargs, diropres, fhandle, RC_REPLBUFF, ST+FH+AT), PROC(rmdir, diropargs, void, none, RC_REPLSTAT, ST), - PROC(readdir, readdirargs, readdirres, none, RC_REPLBUFF, 0), + PROC(readdir, readdirargs, readdirres, none, RC_NOCACHE, 0), PROC(statfs, fhandle, statfsres, none, RC_NOCACHE, ST+5), }; @@ -588,6 +589,8 @@ nfserrno (int errno) { nfserr_jukebox, -ETIMEDOUT }, { nfserr_dropit, -EAGAIN }, { nfserr_dropit, -ENOMEM }, + { nfserr_badname, -ESRCH }, + { nfserr_io, -ETXTBSY }, { -1, -EIO } }; int i;