Skip to content

Commit 8a9ffb8

Browse files
khoroshilovchucklever
authored andcommitted
NFSD: restore EINVAL error translation in nfsd_commit()
commit 555dbf1 ("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. Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Fixes: 555dbf1 ("nfsd: Replace use of rwsem with errseq_t") Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent da9e94f commit 8a9ffb8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/nfsd/vfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1173,15 +1173,16 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp, u64 offset,
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;
11791180
break;
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

0 commit comments

Comments
 (0)