summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread')
-rw-r--r--lib/libc_r/uthread/uthread_sendfile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_sendfile.c b/lib/libc_r/uthread/uthread_sendfile.c
index 901d523..81dcf63 100644
--- a/lib/libc_r/uthread/uthread_sendfile.c
+++ b/lib/libc_r/uthread/uthread_sendfile.c
@@ -139,8 +139,11 @@ _sendfile(int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr *hdtr,
/*
* If we're not blocking then return.
*/
- if (!blocking)
+ if (!blocking) {
+ _FD_UNLOCK(s, FD_WRITE);
+ _FD_UNLOCK(fd, FD_READ);
goto SHORT_WRITE;
+ }
/*
* Otherwise wait on the fd.
OpenPOWER on IntegriCloud