Skip to content

Commit 115d941

Browse files
khoroshilovgregkh
authored andcommitted
NFSD: restore EINVAL error translation in nfsd_commit()
commit 8a9ffb8 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c9f8f94 commit 115d941

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
@@ -1142,15 +1142,16 @@ nfsd_commit(struct svc_rqst *rqstp, struct svc_fh *fhp,
11421142
nfsd_net_id));
11431143
err2 = filemap_check_wb_err(nf->nf_file->f_mapping,
11441144
since);
1145+
err = nfserrno(err2);
11451146
break;
11461147
case -EINVAL:
11471148
err = nfserr_notsupp;
11481149
break;
11491150
default:
11501151
nfsd_reset_boot_verifier(net_generic(nf->nf_net,
11511152
nfsd_net_id));
1153+
err = nfserrno(err2);
11521154
}
1153-
err = nfserrno(err2);
11541155
} else
11551156
nfsd_copy_boot_verifier(verf, net_generic(nf->nf_net,
11561157
nfsd_net_id));

0 commit comments

Comments
 (0)