Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/nfs Pull up revision 1.89 (requested by yamt in tic...
details: https://anonhg.NetBSD.org/src/rev/bb60e64c2deb
branches: netbsd-2-0
changeset: 561287:bb60e64c2deb
user: jdc <jdc%NetBSD.org@localhost>
date: Sat Jun 05 20:43:20 2004 +0000
description:
Pull up revision 1.89 (requested by yamt in ticket #445).
nfsrv_create: fix an LP64 problem for exclusive create.
diffstat:
sys/nfs/nfs_serv.c | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 72bc0283ab43 -r bb60e64c2deb sys/nfs/nfs_serv.c
--- a/sys/nfs/nfs_serv.c Sat Jun 05 20:42:06 2004 +0000
+++ b/sys/nfs/nfs_serv.c Sat Jun 05 20:43:20 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_serv.c,v 1.87 2004/01/07 12:17:10 yamt Exp $ */
+/* $NetBSD: nfs_serv.c,v 1.87.2.1 2004/06/05 20:43:20 jdc Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.87 2004/01/07 12:17:10 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.87.2.1 2004/06/05 20:43:20 jdc Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1477,8 +1477,12 @@
if (exclusive_flag) {
exclusive_flag = 0;
VATTR_NULL(&va);
- memcpy((caddr_t)&va.va_atime, cverf,
- NFSX_V3CREATEVERF);
+ /*
+ * XXX
+ * assuming NFSX_V3CREATEVERF
+ * == sizeof(nfstime3)
+ */
+ fxdr_nfsv3time(cverf, &va.va_atime);
error = VOP_SETATTR(nd.ni_vp, &va, cred,
procp);
}
@@ -1546,9 +1550,16 @@
vput(vp);
}
if (v3) {
- if (exclusive_flag && !error &&
- memcmp(cverf, (caddr_t)&va.va_atime, NFSX_V3CREATEVERF))
- error = EEXIST;
+ if (exclusive_flag && !error) {
+ /*
+ * XXX assuming NFSX_V3CREATEVERF == sizeof(nfstime3)
+ */
+ char oldverf[NFSX_V3CREATEVERF];
+
+ txdr_nfsv3time(&va.va_atime, oldverf);
+ if (memcmp(cverf, oldverf, NFSX_V3CREATEVERF))
+ error = EEXIST;
+ }
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, procp);
vrele(dirp);
}
Home |
Main Index |
Thread Index |
Old Index