Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ufs ufs_balloc_range: correct range to clear PG_RDONLY.
details: https://anonhg.NetBSD.org/src/rev/2378f36fe664
branches: trunk
changeset: 584356:2378f36fe664
user: yamt <yamt%NetBSD.org@localhost>
date: Wed Sep 14 10:33:25 2005 +0000
description:
ufs_balloc_range: correct range to clear PG_RDONLY.
fix a panic in ubc_fault.
diffstat:
sys/ufs/ufs/ufs_inode.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 2272c9d40b5c -r 2378f36fe664 sys/ufs/ufs/ufs_inode.c
--- a/sys/ufs/ufs/ufs_inode.c Wed Sep 14 09:41:24 2005 +0000
+++ b/sys/ufs/ufs/ufs_inode.c Wed Sep 14 10:33:25 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_inode.c,v 1.52 2005/08/28 19:37:59 thorpej Exp $ */
+/* $NetBSD: ufs_inode.c,v 1.53 2005/09/14 10:33:25 yamt Exp $ */
/*
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.52 2005/08/28 19:37:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_inode.c,v 1.53 2005/09/14 10:33:25 yamt Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -199,6 +199,7 @@
int flags)
{
off_t oldeof, neweof, oldeob, oldeop, neweob, pagestart;
+ off_t eob;
struct uvm_object *uobj;
struct genfs_node *gp = VTOG(vp);
int i, delta, error, npages;
@@ -278,12 +279,13 @@
* (since they now have backing store) and unbusy them.
*/
+ GOP_SIZE(vp, off + len, &eob, GOP_SIZE_WRITE);
simple_lock(&uobj->vmobjlock);
for (i = 0; i < npages; i++) {
if (error) {
pgs[i]->flags |= PG_RELEASED;
} else if (off <= pagestart + (i << PAGE_SHIFT) &&
- pagestart + ((i + 1) << PAGE_SHIFT) <= off + len) {
+ pagestart + ((i + 1) << PAGE_SHIFT) <= eob) {
pgs[i]->flags &= ~PG_RDONLY;
}
}
Home |
Main Index |
Thread Index |
Old Index