History

NFSD: restore EINVAL error translation in nfsd_commit()

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.

Alexey Khoroshilov committed 4 years ago

Commit 8a9ffb81 parent da9e94f1 file · +2 −1Browse files

Unified · Split

fs/nfsd/vfs.c+2−1
@@ -1173,6 +1173,7 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset, · 1172 unmodified lines
1173 nfsd_copy_write_verifier(verf, nn);1173 nfsd_copy_write_verifier(verf, nn);
1174 err2 = filemap_check_wb_err(nf->nf_file->f_mapping,1174 err2 = filemap_check_wb_err(nf->nf_file->f_mapping,
1175 since);1175 since);
1176 err = nfserrno(err2);
1176 break;1177 break;
1177 case -EINVAL:1178 case -EINVAL:
1178 err = nfserr_notsupp;1179 err = nfserr_notsupp;
@@ -1180,8 +1181,8 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset, · 1 unmodified line
1180 default:1181 default:
1181 nfsd_reset_write_verifier(nn);1182 nfsd_reset_write_verifier(nn);
1182 trace_nfsd_writeverf_reset(nn, rqstp, err2);1183 trace_nfsd_writeverf_reset(nn, rqstp, err2);
1184 err = nfserrno(err2);
1183 }1185 }
1184 err = nfserrno(err2);
1185 } else1186 } else
1186 nfsd_copy_write_verifier(verf, nn);1187 nfsd_copy_write_verifier(verf, nn);
1187 1188

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t