[PATCH 3/5] virtio-blk: remove the unused list of pending requests

From: Christoph Hellwig
Date: Wed Oct 05 2011 - 15:55:44 EST


Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: linux-2.6/drivers/block/virtio_blk.c
===================================================================
--- linux-2.6.orig/drivers/block/virtio_blk.c 2011-10-03 19:55:29.061215040 +0200
+++ linux-2.6/drivers/block/virtio_blk.c 2011-10-03 19:55:54.196412176 +0200
@@ -24,9 +24,6 @@ struct virtio_blk
/* The disk structure for the kernel. */
struct gendisk *disk;

- /* Request tracking. */
- struct list_head reqs;
-
mempool_t *pool;

/* Process context for config space updates */
@@ -41,7 +38,6 @@ struct virtio_blk

struct virtblk_req
{
- struct list_head list;
struct request *req;
struct virtio_blk_outhdr out_hdr;
struct virtio_scsi_inhdr in_hdr;
@@ -85,7 +81,6 @@ static void blk_done(struct virtqueue *v
}

__blk_end_request_all(vbr->req, error);
- list_del(&vbr->list);
mempool_free(vbr, vblk->pool);
}
/* In case queue is stopped waiting for more buffers. */
@@ -170,7 +165,6 @@ static bool do_req(struct request_queue
return false;
}

- list_add_tail(&vbr->list, &vblk->reqs);
return true;
}

@@ -368,7 +362,6 @@ static int __devinit virtblk_probe(struc
goto out;
}

- INIT_LIST_HEAD(&vblk->reqs);
spin_lock_init(&vblk->lock);
vblk->vdev = vdev;
vblk->sg_elems = sg_elems;
@@ -526,9 +519,6 @@ static void __devexit virtblk_remove(str

flush_work(&vblk->config_work);

- /* Nothing should be pending. */
- BUG_ON(!list_empty(&vblk->reqs));
-
/* Stop all the virtqueues. */
vdev->config->reset(vdev);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/