Skip to content

Commit 69cb6c6

Browse files
committed
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()
2 parents 34074da + a23dd54 commit 69cb6c6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

fs/nfsd/vfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,15 +1179,16 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset,
11791179
nfsd_copy_write_verifier(verf, nn);
11801180
err2 = filemap_check_wb_err(nf->nf_file->f_mapping,
11811181
since);
1182+
err = nfserrno(err2);
11821183
break;
11831184
case -EINVAL:
11841185
err = nfserr_notsupp;
11851186
break;
11861187
default:
11871188
nfsd_reset_write_verifier(nn);
11881189
trace_nfsd_writeverf_reset(nn, rqstp, err2);
1190+
err = nfserrno(err2);
11891191
}
1190-
err = nfserrno(err2);
11911192
} else
11921193
nfsd_copy_write_verifier(verf, nn);
11931194

net/sunrpc/xdr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ static noinline __be32 *xdr_get_next_encode_buffer(struct xdr_stream *xdr,
984984
p = page_address(*xdr->page_ptr);
985985
xdr->p = p + frag2bytes;
986986
space_left = xdr->buf->buflen - xdr->buf->len;
987-
if (space_left - nbytes >= PAGE_SIZE)
987+
if (space_left - frag1bytes >= PAGE_SIZE)
988988
xdr->end = p + PAGE_SIZE;
989989
else
990990
xdr->end = p + space_left - frag1bytes;

0 commit comments

Comments
 (0)