We are required to hold uvm.swap_data_lock here too.
This commit is contained in:
parent
432c309931
commit
cbcd623862
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_swap.c,v 1.113 2006/12/01 16:06:09 elad Exp $ */
|
||||
/* $NetBSD: uvm_swap.c,v 1.114 2006/12/02 03:23:38 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Matthew R. Green
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.113 2006/12/01 16:06:09 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uvm_swap.c,v 1.114 2006/12/02 03:23:38 elad Exp $");
|
||||
|
||||
#include "fs_nfs.h"
|
||||
#include "opt_uvmhist.h"
|
||||
@ -382,7 +382,9 @@ uvm_is_swap_device(struct vnode *vp)
|
||||
boolean_t r;
|
||||
|
||||
lockmgr(&swap_syscall_lock, LK_EXCLUSIVE, NULL);
|
||||
simple_lock(&uvm.swap_data_lock);
|
||||
r = (swaplist_find(vp, 0) != NULL) ? TRUE : FALSE;
|
||||
simple_unlock(&uvm.swap_data_lock);
|
||||
lockmgr(&swap_syscall_lock, LK_RELEASE, NULL);
|
||||
|
||||
return (r);
|
||||
|
Loading…
Reference in New Issue
Block a user