diff options
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r-- | drivers/char/virtio_console.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 6928d094451d..60aafb8a1f2e 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -901,9 +901,9 @@ static int pipe_to_sg(struct pipe_inode_info *pipe, struct pipe_buffer *buf, | |||
901 | if (len + offset > PAGE_SIZE) | 901 | if (len + offset > PAGE_SIZE) |
902 | len = PAGE_SIZE - offset; | 902 | len = PAGE_SIZE - offset; |
903 | 903 | ||
904 | src = buf->ops->map(pipe, buf, 1); | 904 | src = kmap_atomic(buf->page); |
905 | memcpy(page_address(page) + offset, src + buf->offset, len); | 905 | memcpy(page_address(page) + offset, src + buf->offset, len); |
906 | buf->ops->unmap(pipe, buf, src); | 906 | kunmap_atomic(src); |
907 | 907 | ||
908 | sg_set_page(&(sgl->sg[sgl->n]), page, len, offset); | 908 | sg_set_page(&(sgl->sg[sgl->n]), page, len, offset); |
909 | } | 909 | } |