diff --git a/lib/libc_r/uthread/uthread_sendfile.c b/lib/libc_r/uthread/uthread_sendfile.c index 901d523abf8a..81dcf63283c5 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.