Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/miscfs/genfs Redo rev. 1.57 a bit different way; don't u...



details:   https://anonhg.NetBSD.org/src/rev/c5cec8ece27b
branches:  trunk
changeset: 526775:c5cec8ece27b
user:      enami <enami%NetBSD.org@localhost>
date:      Fri May 10 07:51:37 2002 +0000

description:
Redo rev. 1.57 a bit different way; don't use `tpg' since it may be freed.
Subtract the number of pages behind us when calculating new offset instead.

diffstat:

 sys/miscfs/genfs/genfs_vnops.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r ec53a6c44c5f -r c5cec8ece27b sys/miscfs/genfs/genfs_vnops.c
--- a/sys/miscfs/genfs/genfs_vnops.c    Fri May 10 05:49:21 2002 +0000
+++ b/sys/miscfs/genfs/genfs_vnops.c    Fri May 10 07:51:37 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: genfs_vnops.c,v 1.60 2002/05/10 02:51:44 enami Exp $   */
+/*     $NetBSD: genfs_vnops.c,v 1.61 2002/05/10 07:51:37 enami Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.60 2002/05/10 02:51:44 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.61 2002/05/10 07:51:37 enami Exp $");
 
 #include "opt_nfsserver.h"
 
@@ -1184,6 +1184,7 @@
                } else {
                        pgs[0] = pg;
                        npages = 1;
+                       nback = 0;
                }
 
                /*
@@ -1267,7 +1268,7 @@
                                pg = TAILQ_NEXT(pg, listq);
                        }
                } else {
-                       off = tpg->offset + PAGE_SIZE;
+                       off += (npages - nback) << PAGE_SHIFT;
                        if (off < endoff) {
                                pg = uvm_pagelookup(uobj, off);
                        }



Home | Main Index | Thread Index | Old Index