vserver 2.0 rc7
[linux-2.6.git] / fs / nfsd / nfsproc.c
index 337c8c3..757f9d2 100644 (file)
@@ -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;