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
11731173 nfsd_copy_write_verifier(verf, nn);
11741174 err2 = filemap_check_wb_err(nf->nf_file->f_mapping,
11751175 since);
1176+ err = nfserrno(err2);
11761177 break;
11771178 case -EINVAL:
11781179 err = nfserr_notsupp;
@@ -1180,8 +1181,8 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset, · 1 unmodified line
11801181 default:
11811182 nfsd_reset_write_verifier(nn);
11821183 trace_nfsd_writeverf_reset(nn, rqstp, err2);
1184+ err = nfserrno(err2);
11831185 }
1184− err = nfserrno(err2);
11851186 } else
11861187 nfsd_copy_write_verifier(verf, nn);
11871188

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