From: Al Viro -EINVAL (in host order, no less) is not a good thing to return to client. nfsd4_truncate() returns it in one case and its callers expect nfs_.... from it. AFAICS, it should be nfserr_inval Signed-off-by: Al Viro Signed-off-by: Neil Brown Signed-off-by: Andrew Morton --- fs/nfsd/nfs4state.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/nfsd/nfs4state.c~nfsd4_truncate-bogus-return-value fs/nfsd/nfs4state.c --- 25/fs/nfsd/nfs4state.c~nfsd4_truncate-bogus-return-value Fri Jan 13 17:54:24 2006 +++ 25-akpm/fs/nfsd/nfs4state.c Fri Jan 13 17:54:24 2006 @@ -1601,7 +1601,7 @@ nfsd4_truncate(struct svc_rqst *rqstp, s if (!open->op_truncate) return 0; if (!(open->op_share_access & NFS4_SHARE_ACCESS_WRITE)) - return -EINVAL; + return nfserr_inval; return nfsd_setattr(rqstp, fh, &iattr, 0, (time_t)0); } _