block: Use hlist_entry() for io_context.cic_list.first
authorPaul Bolle <[email protected]>
Thu, 2 Jun 2011 11:05:02 +0000 (13:05 +0200)
committerJens Axboe <[email protected]>
Thu, 2 Jun 2011 11:05:02 +0000 (13:05 +0200)
list_entry() and hlist_entry() are both simply aliases for
container_of(), but since io_context.cic_list.first is an hlist_node one
should at least use the correct alias.

Signed-off-by: Paul Bolle <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
block/blk-ioc.c

index c898049dafd54d8ea9deed98885b02db10ce43e7..342eae9b0d3cf982762987dfc5efb9a59f9b7275 100644 (file)
@@ -21,7 +21,7 @@ static void cfq_dtor(struct io_context *ioc)
        if (!hlist_empty(&ioc->cic_list)) {
                struct cfq_io_context *cic;
 
-               cic = list_entry(ioc->cic_list.first, struct cfq_io_context,
+               cic = hlist_entry(ioc->cic_list.first, struct cfq_io_context,
                                                                cic_list);
                cic->dtor(ioc);
        }
@@ -57,7 +57,7 @@ static void cfq_exit(struct io_context *ioc)
        if (!hlist_empty(&ioc->cic_list)) {
                struct cfq_io_context *cic;
 
-               cic = list_entry(ioc->cic_list.first, struct cfq_io_context,
+               cic = hlist_entry(ioc->cic_list.first, struct cfq_io_context,
                                                                cic_list);
                cic->exit(ioc);
        }