OpenBSD: Fix use of mstat Length field in osi_vm.c
authorAntoine Verheijen <antoine@ualberta.ca>
Wed, 1 Dec 2010 21:24:26 +0000 (14:24 -0700)
committerDerrick Brashear <shadow@dementia.org>
Thu, 2 Dec 2010 06:03:18 +0000 (22:03 -0800)
The code for osi_VM_FlushPages() in osi_vm.c for OpenBSD incorrectly
tries to access field "m.Length" in the vcache structure "avc"
instead of "f.m.Length".

Change-Id: I44ac0bbbd0e6279c54be185fbf9514b23c65017b
Reviewed-on: http://gerrit.openafs.org/3417
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/OBSD/osi_vm.c

index 9c4a8c4..737b742 100644 (file)
@@ -102,7 +102,7 @@ osi_VM_FlushPages(struct vcache *avc, afs_ucred_t *credp)
        return;
     cache_purge(vp);
     uvm_vnp_uncache(vp);
-    uvm_vnp_setsize(vp, avc->m.Length);
+    uvm_vnp_setsize(vp, avc->f.m.Length);
 }
 
 /* Purge pages beyond end-of-file, when truncating a file.