]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_net: Pass gfp flags when allocating rx buffers.
authorMike Waychison <mikew@google.com>
Wed, 4 Jan 2012 12:52:32 +0000 (12:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Jan 2012 18:20:40 +0000 (13:20 -0500)
commit58841eabb51455ef8a22d60cfa9d56e014225366
treedc47cf6f3965f09d65fc9bd5e628cebc9d6b3eec
parentad26f1a07efe0fd26b40d8d05f4b483929d50a22
virtio_net: Pass gfp flags when allocating rx buffers.

Currently, the refill path for RX buffers will always allocate the
buffers as GFP_ATOMIC, even if we are in process context.  This will
fail to apply memory pressure as the worker thread will not contribute
to the freeing of memory.

Fix this by changing add_recvbuf_small to use the gfp variant allocator,
__netdev_alloc_skb_ip_align().

Signed-off-by: Mike Waychison <mikew@google.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c