Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9246585a authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

[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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d75f2b9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}