Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/nfs Pull up revision 1.63 (requested by bouyer in t...
details: https://anonhg.NetBSD.org/src/rev/6aad8dfcc34d
branches: netbsd-1-6
changeset: 529118:6aad8dfcc34d
user: lukem <lukem%NetBSD.org@localhost>
date: Mon Sep 30 13:49:53 2002 +0000
description:
Pull up revision 1.63 (requested by bouyer in ticket #880):
nfsrv_commit(): Properly handle the case cnt == 0, which means "flush to
end of file". Calling VOP_FSYNC with start == end triggers a DIAGNOSTIC
check. Noticed with NFSv3 Linux clients. OK'd by fvdl.
diffstat:
sys/nfs/nfs_serv.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r e01ce6fa0bc9 -r 6aad8dfcc34d sys/nfs/nfs_serv.c
--- a/sys/nfs/nfs_serv.c Mon Sep 30 13:47:00 2002 +0000
+++ b/sys/nfs/nfs_serv.c Mon Sep 30 13:49:53 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_serv.c,v 1.62.10.1 2002/09/30 13:47:00 lukem Exp $ */
+/* $NetBSD: nfs_serv.c,v 1.62.10.2 2002/09/30 13:49:53 lukem Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.62.10.1 2002/09/30 13:47:00 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.62.10.2 2002/09/30 13:49:53 lukem Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -3009,7 +3009,10 @@
return (0);
}
for_ret = VOP_GETATTR(vp, &bfor, cred, procp);
- error = VOP_FSYNC(vp, cred, FSYNC_WAIT, off, off + cnt, procp);
+ if (cnt > 0)
+ error = VOP_FSYNC(vp, cred, FSYNC_WAIT, off, off + cnt, procp);
+ else
+ error = VOP_FSYNC(vp, cred, FSYNC_WAIT, off, vp->v_size, procp);
aft_ret = VOP_GETATTR(vp, &aft, cred, procp);
vput(vp);
nfsm_reply(NFSX_V3WCCDATA + NFSX_V3WRITEVERF);
Home |
Main Index |
Thread Index |
Old Index