summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-01-18 17:43:46 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 19:20:27 -0800
commit9246585a117f182d26a5a5c15872c3e8fcf44dd6 (patch)
treefe8d8ce681a9bf48f64d270fd95e128864962dfa /fs
parentd75f2b9f5da71667aba7e97a962c49f1e17aa4ca (diff)
downloadtalos-obmc-linux-9246585a117f182d26a5a5c15872c3e8fcf44dd6.tar.gz
talos-obmc-linux-9246585a117f182d26a5a5c15872c3e8fcf44dd6.zip
[PATCH] nfsd4_truncate() bogus return value
-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 <viro@zeniv.linux.org.uk> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 82c36ccd8b5c..ddee0e0371a6 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1600,7 +1600,7 @@ nfsd4_truncate(struct svc_rqst *rqstp, struct svc_fh *fh,
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);
}
OpenPOWER on IntegriCloud