summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2004-03-14 04:06:33 +0000
committeralc <alc@FreeBSD.org>2004-03-14 04:06:33 +0000
commit4c543aa1c6d733ad19e90c00c20529614887f065 (patch)
tree7f43f3795e1c24e357985f3246e1a5bb37ce1c1b
parentbd5efd46002ab435a3543c06a8463f93bf87b51e (diff)
downloadFreeBSD-src-4c543aa1c6d733ad19e90c00c20529614887f065.zip
FreeBSD-src-4c543aa1c6d733ad19e90c00c20529614887f065.tar.gz
Simplify sf_buf_alloc().
-rw-r--r--sys/i386/i386/vm_machdep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index e9e236f..919f33f 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -616,10 +616,9 @@ sf_buf_alloc(struct vm_page *m)
mtx_lock(&sf_buf_lock);
LIST_FOREACH(sf, hash_list, list_entry) {
if (sf->m == m) {
- if (sf->ref_count == 0)
- TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry);
sf->ref_count++;
if (sf->ref_count == 1) {
+ TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry);
nsfbufsused++;
nsfbufspeak = imax(nsfbufspeak, nsfbufsused);
}
OpenPOWER on IntegriCloud