diff options
author | alc <alc@FreeBSD.org> | 2003-09-06 21:02:10 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-09-06 21:02:10 +0000 |
commit | 0c9dc7eaa4a3e6208dfe611210adb4dbcc7b3038 (patch) | |
tree | e1b0f743929614728e967cd4381dc9b1afb37836 /sys | |
parent | 1abfd7c90067d19af0dd252201a35e2eab5fc2bd (diff) | |
download | FreeBSD-src-0c9dc7eaa4a3e6208dfe611210adb4dbcc7b3038.zip FreeBSD-src-0c9dc7eaa4a3e6208dfe611210adb4dbcc7b3038.tar.gz |
Giant is no longer required by pipe_destroy_write_buffer(). Reduce
unnecessary white space from pipe_destroy_write_buffer().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/sys_pipe.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index e003d5e..50ea163 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -743,9 +743,7 @@ pipe_destroy_write_buffer(wpipe) { int i; - GIANT_REQUIRED; PIPE_LOCK_ASSERT(wpipe, MA_NOTOWNED); - if (wpipe->pipe_map.kva) { pmap_qremove(wpipe->pipe_map.kva, wpipe->pipe_map.npages); @@ -754,7 +752,7 @@ pipe_destroy_write_buffer(wpipe) vm_offset_t kva = wpipe->pipe_map.kva; wpipe->pipe_map.kva = 0; kmem_free(kernel_map, kva, - wpipe->pipe_buffer.size + PAGE_SIZE); + wpipe->pipe_buffer.size + PAGE_SIZE); atomic_subtract_int(&amountpipekvawired, wpipe->pipe_buffer.size + PAGE_SIZE); } @@ -788,11 +786,11 @@ pipe_clone_write_buffer(wpipe) wpipe->pipe_buffer.cnt = size; wpipe->pipe_state &= ~PIPE_DIRECTW; - PIPE_GET_GIANT(wpipe); + PIPE_UNLOCK(wpipe); bcopy((caddr_t) wpipe->pipe_map.kva + pos, wpipe->pipe_buffer.buffer, size); pipe_destroy_write_buffer(wpipe); - PIPE_DROP_GIANT(wpipe); + PIPE_LOCK(wpipe); } /* @@ -861,9 +859,9 @@ retry: while (!error && (wpipe->pipe_state & PIPE_DIRECTW)) { if (wpipe->pipe_state & PIPE_EOF) { pipelock(wpipe, 0); - PIPE_GET_GIANT(wpipe); + PIPE_UNLOCK(wpipe); pipe_destroy_write_buffer(wpipe); - PIPE_DROP_GIANT(wpipe); + PIPE_LOCK(wpipe); pipeselwakeup(wpipe); pipeunlock(wpipe); error = EPIPE; @@ -886,9 +884,9 @@ retry: */ pipe_clone_write_buffer(wpipe); } else { - PIPE_GET_GIANT(wpipe); + PIPE_UNLOCK(wpipe); pipe_destroy_write_buffer(wpipe); - PIPE_DROP_GIANT(wpipe); + PIPE_LOCK(wpipe); } pipeunlock(wpipe); return (error); |