From: Venkatesh Srinivas Date: Tue, 14 Jun 2011 03:59:59 +0000 (-0700) Subject: kernel -- vm: Restore vm_token in page fault path. X-Git-Tag: v2.12.0~459^2~5 X-Git-Url: https://gitweb.dragonflybsd.org/~nant/dragonfly.git/commitdiff_plain/0bc41be71b9d611ff86552e8ada125e0e9ac68bf kernel -- vm: Restore vm_token in page fault path. This partly reverts b4460ab356b9d7f1bd11c8badbf2a6dc97a7776f. The vm_object has not been fully tokenized, so removing vm_token takes there was premature. --- diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index b98dd113b8..f5f5f25b2a 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -357,11 +357,13 @@ RetryFault: * * The vm_object must be held before manipulation. */ + lwkt_gettoken(&vm_token); vm_object_hold(fs.first_object); vm_object_reference(fs.first_object); fs.vp = vnode_pager_lock(fs.first_object); vm_object_pip_add(fs.first_object, 1); vm_object_drop(fs.first_object); + lwkt_reltoken(&vm_token); fs.lookup_still_valid = TRUE; fs.first_m = NULL; @@ -587,11 +589,13 @@ RetryFault: * * The vm_object must be held before manipulation. */ + lwkt_gettoken(&vm_token); vm_object_hold(fs.first_object); vm_object_reference(fs.first_object); fs.vp = vnode_pager_lock(fs.first_object); vm_object_pip_add(fs.first_object, 1); vm_object_drop(fs.first_object); + lwkt_reltoken(&vm_token); fs.lookup_still_valid = TRUE; fs.first_m = NULL; @@ -746,11 +750,13 @@ RetryFault: * truncation operations) during I/O. This must be done after * obtaining the vnode lock in order to avoid possible deadlocks. */ + lwkt_gettoken(&vm_token); vm_object_hold(fs.first_object); vm_object_reference(fs.first_object); fs.vp = vnode_pager_lock(fs.first_object); vm_object_pip_add(fs.first_object, 1); vm_object_drop(fs.first_object); + lwkt_reltoken(&vm_token); fs.lookup_still_valid = TRUE; fs.first_m = NULL;