Commit 69cb6c65 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'nfsd-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux

Pull nfsd fixes from Chuck Lever:
 "Notable regression fixes:

   - Fix NFSD crash during NFSv4.2 READ_PLUS operation

   - Fix incorrect status code returned by COMMIT operation"

* tag 'nfsd-5.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
  SUNRPC: Fix READ_PLUS crasher
  NFSD: restore EINVAL error translation in nfsd_commit()
parents 34074da5 a23dd544
...@@ -1179,6 +1179,7 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset, ...@@ -1179,6 +1179,7 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset,
nfsd_copy_write_verifier(verf, nn); nfsd_copy_write_verifier(verf, nn);
err2 = filemap_check_wb_err(nf->nf_file->f_mapping, err2 = filemap_check_wb_err(nf->nf_file->f_mapping,
since); since);
err = nfserrno(err2);
break; break;
case -EINVAL: case -EINVAL:
err = nfserr_notsupp; err = nfserr_notsupp;
...@@ -1186,8 +1187,8 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset, ...@@ -1186,8 +1187,8 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset,
default: default:
nfsd_reset_write_verifier(nn); nfsd_reset_write_verifier(nn);
trace_nfsd_writeverf_reset(nn, rqstp, err2); trace_nfsd_writeverf_reset(nn, rqstp, err2);
err = nfserrno(err2);
} }
err = nfserrno(err2);
} else } else
nfsd_copy_write_verifier(verf, nn); nfsd_copy_write_verifier(verf, nn);
......
...@@ -984,7 +984,7 @@ static noinline __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr, ...@@ -984,7 +984,7 @@ static noinline __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr,
p = page_address(*xdr->page_ptr); p = page_address(*xdr->page_ptr);
xdr->p = p + frag2bytes; xdr->p = p + frag2bytes;
space_left = xdr->buf->buflen - xdr->buf->len; space_left = xdr->buf->buflen - xdr->buf->len;
if (space_left - nbytes >= PAGE_SIZE) if (space_left - frag1bytes >= PAGE_SIZE)
xdr->end = p + PAGE_SIZE; xdr->end = p + PAGE_SIZE;
else else
xdr->end = p + space_left - frag1bytes; xdr->end = p + space_left - frag1bytes;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment