mmc: dw_mmc: Make sure we don't get stuck when we get an error
[firefly-linux-kernel-4.4.55.git] / fs / nfsd / nfs3proc.c
index 401289913130841a8547e8be40de716b90af13d6..fa2525b2e9d798c5f2f9249eac65d3a0c0cdcdfd 100644 (file)
@@ -157,11 +157,7 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp,
         * 1 (status) + 22 (post_op_attr) + 1 (count) + 1 (eof)
         * + 1 (xdr opaque byte count) = 26
         */
-
-       resp->count = argp->count;
-       if (max_blocksize < resp->count)
-               resp->count = max_blocksize;
-
+       resp->count = min(argp->count, max_blocksize);
        svc_reserve_auth(rqstp, ((1 + NFS3_POST_OP_ATTR_WORDS + 3)<<2) + resp->count +4);
 
        fh_copy(&resp->fh, &argp->fh);
@@ -286,8 +282,7 @@ nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp,
        fh_copy(&resp->dirfh, &argp->ffh);
        fh_init(&resp->fh, NFS3_FHSIZE);
        nfserr = nfsd_symlink(rqstp, &resp->dirfh, argp->fname, argp->flen,
-                                                  argp->tname, argp->tlen,
-                                                  &resp->fh, &argp->attrs);
+                                                  argp->tname, &resp->fh);
        RETURN_STATUS(nfserr);
 }