virtio: rename virtqueue_add_buf_gfp to virtqueue_add_buf
Remove wrapper functions. This makes the allocation type explicit in all callers; I used GPF_KERNEL where it seemed obvious, left it at GFP_ATOMIC otherwise. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -392,7 +392,7 @@ static int add_inbuf(struct virtqueue *vq, struct port_buffer *buf)
|
||||
|
||||
sg_init_one(sg, buf->buf, buf->size);
|
||||
|
||||
ret = virtqueue_add_buf(vq, sg, 0, 1, buf);
|
||||
ret = virtqueue_add_buf(vq, sg, 0, 1, buf, GFP_ATOMIC);
|
||||
virtqueue_kick(vq);
|
||||
return ret;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
|
||||
vq = portdev->c_ovq;
|
||||
|
||||
sg_init_one(sg, &cpkt, sizeof(cpkt));
|
||||
if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt) >= 0) {
|
||||
if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt, GFP_ATOMIC) >= 0) {
|
||||
virtqueue_kick(vq);
|
||||
while (!virtqueue_get_buf(vq, &len))
|
||||
cpu_relax();
|
||||
@@ -506,7 +506,7 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count,
|
||||
reclaim_consumed_buffers(port);
|
||||
|
||||
sg_init_one(sg, in_buf, in_count);
|
||||
ret = virtqueue_add_buf(out_vq, sg, 1, 0, in_buf);
|
||||
ret = virtqueue_add_buf(out_vq, sg, 1, 0, in_buf, GFP_ATOMIC);
|
||||
|
||||
/* Tell Host to go! */
|
||||
virtqueue_kick(out_vq);
|
||||
|
Reference in New Issue
Block a user