virtio/console: Add a failback for unstealable pipe buffer
authorMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Thu, 9 Aug 2012 12:30:50 +0000 (21:30 +0900)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 28 Sep 2012 05:35:12 +0000 (15:05 +0930)
commitec8fc870156b2b144f55b6a5a7d135018f04b30e
tree449d9375e37f7ff938d214690f4ed72779abf522
parenteb5e89fc70bb3f115b3206ed0c57d3aba1fdd155
virtio/console: Add a failback for unstealable pipe buffer

Add a failback memcpy path for unstealable pipe buffer.
If buf->ops->steal() fails, virtio-serial tries to
copy the page contents to an allocated page, instead
of just failing splice().

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c