| 2491 | } |
| 2492 | |
| 2493 | static void |
| 2494 | unp_process_defers(void *arg __unused, int pending) |
| 2495 | { |
| 2496 | struct unp_defer *dr; |
| 2497 | SLIST_HEAD(, unp_defer) drl; |
| 2498 | int count; |
| 2499 | |
| 2500 | SLIST_INIT(&drl); |
| 2501 | for (;;) { |
| 2502 | UNP_DEFERRED_LOCK(); |
| 2503 | if (SLIST_FIRST(&unp_defers) == NULL) { |
| 2504 | UNP_DEFERRED_UNLOCK(); |
| 2505 | break; |
| 2506 | } |
| 2507 | SLIST_SWAP(&unp_defers, &drl, unp_defer); |
| 2508 | UNP_DEFERRED_UNLOCK(); |
| 2509 | count = 0; |
| 2510 | while ((dr = SLIST_FIRST(&drl)) != NULL) { |
| 2511 | SLIST_REMOVE_HEAD(&drl, ud_link); |
| 2512 | closef_nothread(dr->ud_fp); |
| 2513 | free(dr, M_TEMP); |
| 2514 | count++; |
| 2515 | } |
| 2516 | atomic_add_int(&unp_defers_count, -count); |
| 2517 | } |
| 2518 | } |
| 2519 | |
| 2520 | static void |
| 2521 | unp_internalize_fp(struct file *fp) |
nothing calls this directly
no test coverage detected