diff options
author | vsakar <none@none> | 2006-04-27 20:09:43 -0700 |
---|---|---|
committer | vsakar <none@none> | 2006-04-27 20:09:43 -0700 |
commit | 02ff05a9110e19d8d0bbe707064f193f4a40065a (patch) | |
tree | 124ed4e227da0edd8cea89b3742d94a0a5814af0 /usr/src/uts/common/vm/vm_as.c | |
parent | 0b6016e6ff70af39f99c9cc28e0c2207c8f5413c (diff) | |
download | illumos-gate-02ff05a9110e19d8d0bbe707064f193f4a40065a.tar.gz |
4339897 system hangs in ufs_check_lockfs().
4889187 ufs_quiesce()/ufs_readdir()/ufs_create() - 3 way deadlock
Diffstat (limited to 'usr/src/uts/common/vm/vm_as.c')
-rw-r--r-- | usr/src/uts/common/vm/vm_as.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/usr/src/uts/common/vm/vm_as.c b/usr/src/uts/common/vm/vm_as.c index b03d712069..f7533f56a6 100644 --- a/usr/src/uts/common/vm/vm_as.c +++ b/usr/src/uts/common/vm/vm_as.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -77,6 +76,7 @@ static struct kmem_cache *as_cache; static void as_setwatchprot(struct as *, caddr_t, size_t, uint_t); static void as_clearwatchprot(struct as *, caddr_t, size_t); +int as_map_locked(struct as *, caddr_t, size_t, int ((*)()), void *); /* @@ -1598,6 +1598,14 @@ again: int as_map(struct as *as, caddr_t addr, size_t size, int (*crfp)(), void *argsp) { + AS_LOCK_ENTER(as, &as->a_lock, RW_WRITER); + return (as_map_locked(as, addr, size, crfp, argsp)); +} + +int +as_map_locked(struct as *as, caddr_t addr, size_t size, int (*crfp)(), + void *argsp) +{ struct seg *seg = NULL; caddr_t raddr; /* rounded down addr */ size_t rsize; /* rounded up size */ @@ -1608,8 +1616,6 @@ as_map(struct as *as, caddr_t addr, size_t size, int (*crfp)(), void *argsp) rsize = (((size_t)(addr + size) + PAGEOFFSET) & PAGEMASK) - (size_t)raddr; - AS_LOCK_ENTER(as, &as->a_lock, RW_WRITER); - /* * check for wrap around */ |