diff options
author | attilio <attilio@FreeBSD.org> | 2013-08-04 15:56:19 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-08-04 15:56:19 +0000 |
commit | e825889721c7ffb3f691d79aa40738f1ee20d3c4 (patch) | |
tree | ab8e623361987d473ef01bd24b6f2d9a03d9cff1 /sys/kern/uipc_syscalls.c | |
parent | c2f521e2b9fbb3ea7c970d632ec70655a79c0970 (diff) | |
download | FreeBSD-src-e825889721c7ffb3f691d79aa40738f1ee20d3c4.zip FreeBSD-src-e825889721c7ffb3f691d79aa40738f1ee20d3c4.tar.gz |
Remove unnecessary soft busy of the page before to do vn_rdwr() in
kern_sendfile() which is unnecessary.
The page is already wired so it will not be subjected to pagefault.
The content cannot be effectively protected as it is full of races
already.
Multiple accesses to the same indexes are serialized through vn_rdwr().
Sponsored by: EMC / Isilon storage division
Reviewed by: alc, jeff
Tested by: pho
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 454909e..c35ef16 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -2246,11 +2246,6 @@ retry_space: ssize_t resid; int readahead = sfreadahead * MAXBSIZE; - /* - * Ensure that our page is still around - * when the I/O completes. - */ - vm_page_io_start(pg); VM_OBJECT_WUNLOCK(obj); /* @@ -2264,11 +2259,9 @@ retry_space: trunc_page(off), UIO_NOCOPY, IO_NODELOCKED | IO_VMIO | ((readahead / bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); - VM_OBJECT_WLOCK(obj); - vm_page_io_finish(pg); - if (!error) - VM_OBJECT_WUNLOCK(obj); SFSTAT_INC(sf_iocnt); + if (error) + VM_OBJECT_WLOCK(obj); } if (error) { vm_page_lock(pg); |