commit 555dbf1a9aac ("nfsd: Replace use of rwsem with errseq_t") incidentally broke translation of -EINVAL to nfserr_notsupp. The patch restores that. Found by Linux Verification Center (linuxtesting.org) with SVACE.
Unified · Split
| @@ -1173,6 +1173,7 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset, · 1172 unmodified lines | ||
| 1173 | 1173 | nfsd_copy_write_verifier(verf, nn); |
| 1174 | 1174 | err2 = filemap_check_wb_err(nf->nf_file->f_mapping, |
| 1175 | 1175 | since); |
| 1176 | + err = nfserrno(err2); | |
| 1176 | 1177 | break; |
| 1177 | 1178 | case -EINVAL: |
| 1178 | 1179 | err = nfserr_notsupp; |
| @@ -1180,8 +1181,8 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset, · 1 unmodified line | ||
| 1180 | 1181 | default: |
| 1181 | 1182 | nfsd_reset_write_verifier(nn); |
| 1182 | 1183 | trace_nfsd_writeverf_reset(nn, rqstp, err2); |
| 1184 | + err = nfserrno(err2); | |
| 1183 | 1185 | } |
| 1184 | − err = nfserrno(err2); | |
| 1185 | 1186 | } else |
| 1186 | 1187 | nfsd_copy_write_verifier(verf, nn); |
| 1187 | 1188 | |