Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs Fix bug in error handling for NFSv3 + nqnfs.
details: https://anonhg.NetBSD.org/src/rev/c49dd1c93e44
branches: trunk
changeset: 477077:c49dd1c93e44
user: sommerfeld <sommerfeld%NetBSD.org@localhost>
date: Sun Oct 10 02:44:55 1999 +0000
description:
Fix bug in error handling for NFSv3 + nqnfs.
With nfsv2, the nfsm_reply() macro always causes the service routine
to return if error was nonzero.
With nfsv3, we can keep going after nfsm_reply() without returning,
but nqnfsrv_getlease() didn't take this into account, so add a
return(0) after each error-case nfsm_reply(0).
diffstat:
sys/nfs/nfs_nqlease.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 5335b0edbc72 -r c49dd1c93e44 sys/nfs/nfs_nqlease.c
--- a/sys/nfs/nfs_nqlease.c Sun Oct 10 01:57:09 1999 +0000
+++ b/sys/nfs/nfs_nqlease.c Sun Oct 10 02:44:55 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_nqlease.c,v 1.29 1999/03/25 04:07:33 sommerfe Exp $ */
+/* $NetBSD: nfs_nqlease.c,v 1.30 1999/10/10 02:44:55 sommerfeld Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -698,12 +698,15 @@
nfsd->nd_duration = fxdr_unsigned(int, *tl);
error = nfsrv_fhtovp(fhp, 1, &vp, cred, slp, nam, &rdonly,
(nfsd->nd_flag & ND_KERBAUTH), FALSE);
- if (error)
+ if (error) {
nfsm_reply(0);
+ return 0;
+ }
if (rdonly && flags == ND_WRITE) {
vput(vp);
error = EROFS;
nfsm_reply(0);
+ return 0;
}
(void) nqsrv_getlease(vp, &nfsd->nd_duration, flags, slp, procp,
nam, &cache, &frev, cred);
Home |
Main Index |
Thread Index |
Old Index