diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-04 07:40:19 +0000 |
commit | 33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 (patch) | |
tree | 2d1b86a40bef0958a68cf1a2eafbeb0667a70543 /net/khttpd/datasending.c | |
parent | 216f5f51aa02f8b113aa620ebc14a9631a217a00 (diff) |
Merge with Linux 2.3.32.
Diffstat (limited to 'net/khttpd/datasending.c')
-rw-r--r-- | net/khttpd/datasending.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/net/khttpd/datasending.c b/net/khttpd/datasending.c index d435af64d..7a1afc1df 100644 --- a/net/khttpd/datasending.c +++ b/net/khttpd/datasending.c @@ -55,16 +55,23 @@ This send_actor is for use with do_generic_file_read (ie sendfile()) It sends the data to the socket indicated by desc->buf. */ -static int sock_send_actor(read_descriptor_t * desc, const char *area, unsigned long size) +static int sock_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size) { int written; + unsigned long kaddr; unsigned long count = desc->count; struct socket *sock = (struct socket *) desc->buf; + mm_segment_t old_fs; if (size > count) size = count; - written = SendBuffer_async(sock,(char *)area,size); + old_fs = get_fs(); + set_fs(KERNEL_DS); + kaddr = kmap(page); + written = SendBuffer_async(sock,(char *)kaddr + offset,size); + kunmap(page); + set_fs(old_fs); if (written < 0) { desc->error = written; written = 0; |