Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs Fix two problems with NFSV3CREATE_GUARDED:
details: https://anonhg.NetBSD.org/src/rev/8cd9423c80e7
branches: trunk
changeset: 467869:8cd9423c80e7
user: mycroft <mycroft%NetBSD.org@localhost>
date: Tue Mar 30 12:01:18 1999 +0000
description:
Fix two problems with NFSV3CREATE_GUARDED:
* We shouldn't truncate the file.
* We were leaving the vnode locked (unless the truncate happened to fail).
Solaris clients may cause this under some conditions.
Problem reported by chopps, analysis and fix by me.
diffstat:
sys/nfs/nfs_serv.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r ce091b038c5c -r 8cd9423c80e7 sys/nfs/nfs_serv.c
--- a/sys/nfs/nfs_serv.c Tue Mar 30 11:51:35 1999 +0000
+++ b/sys/nfs/nfs_serv.c Tue Mar 30 12:01:18 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_serv.c,v 1.49 1999/03/24 05:51:28 mrg Exp $ */
+/* $NetBSD: nfs_serv.c,v 1.50 1999/03/30 12:01:18 mycroft Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -1456,7 +1456,7 @@
else
vput(nd.ni_dvp);
VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
- if (va.va_size != -1) {
+ if (!error && va.va_size != -1) {
error = nfsrv_access(vp, VWRITE, cred,
(nd.ni_cnd.cn_flags & RDONLY), procp, 0);
if (!error) {
@@ -1467,9 +1467,9 @@
error = VOP_SETATTR(vp, &va, cred,
procp);
}
- if (error)
- vput(vp);
}
+ if (error)
+ vput(vp);
}
if (!error) {
memset((caddr_t)fhp, 0, sizeof(nfh));
Home |
Main Index |
Thread Index |
Old Index