mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Simplify sf_buf_alloc().
This commit is contained in:
parent
a5bdcb2a2f
commit
9a63fc0df0
1 changed files with 1 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue