| 2580 | } |
| 2581 | |
| 2582 | static void |
| 2583 | unp_restore_undead_ref(struct filedescent **fdep, int fdcount) |
| 2584 | { |
| 2585 | struct unpcb *unp; |
| 2586 | struct file *fp; |
| 2587 | int i; |
| 2588 | |
| 2589 | /* |
| 2590 | * This function can only be called from the gc task. |
| 2591 | */ |
| 2592 | KASSERT(taskqueue_member(taskqueue_thread, curthread) != 0, |
| 2593 | ("%s: not on gc callout", __func__)); |
| 2594 | UNP_LINK_LOCK_ASSERT(); |
| 2595 | |
| 2596 | for (i = 0; i < fdcount; i++) { |
| 2597 | fp = fdep[i]->fde_file; |
| 2598 | if ((unp = fptounp(fp)) == NULL) |
| 2599 | continue; |
| 2600 | if ((unp->unp_gcflag & UNPGC_DEAD) == 0) |
| 2601 | continue; |
| 2602 | unp->unp_gcrefs++; |
| 2603 | unp_marked++; |
| 2604 | } |
| 2605 | } |
| 2606 | |
| 2607 | static void |
| 2608 | unp_gc_scan(struct unpcb *unp, void (*op)(struct filedescent **, int)) |
nothing calls this directly
no test coverage detected