Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/nfs Pull up revision 1.148 (requested by fvdl):
details: https://anonhg.NetBSD.org/src/rev/69070bccd466
branches: netbsd-1-5
changeset: 492623:69070bccd466
user: he <he%NetBSD.org@localhost>
date: Tue Jan 29 22:21:44 2002 +0000
description:
Pull up revision 1.148 (requested by fvdl):
Set np->n_size before calling nfs_vinvalbuf. Avoids confusion as
to the actual file size.
diffstat:
sys/nfs/nfs_vnops.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 786dc291caec -r 69070bccd466 sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c Tue Jan 29 22:16:37 2002 +0000
+++ b/sys/nfs/nfs_vnops.c Tue Jan 29 22:21:44 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nfs_vnops.c,v 1.113.4.3 2000/12/14 23:37:18 he Exp $ */
+/* $NetBSD: nfs_vnops.c,v 1.113.4.4 2002/01/29 22:21:44 he Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -663,6 +663,8 @@
if (vp->v_mount->mnt_flag & MNT_RDONLY)
return (EROFS);
uvm_vnp_setsize(vp, vap->va_size);
+ tsize = np->n_size;
+ np->n_size = vap->va_size;
if (vap->va_size == 0)
error = nfs_vinvalbuf(vp, 0,
ap->a_cred, ap->a_p, 1);
@@ -670,11 +672,10 @@
error = nfs_vinvalbuf(vp, V_SAVE,
ap->a_cred, ap->a_p, 1);
if (error) {
- uvm_vnp_setsize(vp, np->n_size);
+ uvm_vnp_setsize(vp, tsize);
return (error);
}
- tsize = np->n_size;
- np->n_size = np->n_vattr->va_size = vap->va_size;
+ np->n_vattr->va_size = vap->va_size;
}
} else if ((vap->va_mtime.tv_sec != VNOVAL ||
vap->va_atime.tv_sec != VNOVAL) &&
Home |
Main Index |
Thread Index |
Old Index