* Unwire the process buffer. */
| 913 | * Unwire the process buffer. |
| 914 | */ |
| 915 | static void |
| 916 | pipe_destroy_write_buffer(struct pipe *wpipe) |
| 917 | { |
| 918 | |
| 919 | PIPE_LOCK_ASSERT(wpipe, MA_OWNED); |
| 920 | KASSERT((wpipe->pipe_state & PIPE_DIRECTW) != 0, |
| 921 | ("%s: PIPE_DIRECTW not set on %p", __func__, wpipe)); |
| 922 | KASSERT(wpipe->pipe_pages.cnt == 0, |
| 923 | ("%s: pipe map for %p contains residual data", __func__, wpipe)); |
| 924 | |
| 925 | wpipe->pipe_state &= ~PIPE_DIRECTW; |
| 926 | vm_page_unhold_pages(wpipe->pipe_pages.ms, wpipe->pipe_pages.npages); |
| 927 | wpipe->pipe_pages.npages = 0; |
| 928 | } |
| 929 | |
| 930 | /* |
| 931 | * In the case of a signal, the writing process might go away. This |
no test coverage detected