block: Use hlist_entry() for io_context.cic_list.first
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 <pebolle@tiscali.nl> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
This commit is contained in:
@@ -21,7 +21,7 @@ static void cfq_dtor(struct io_context *ioc)
|
|||||||
if (!hlist_empty(&ioc->cic_list)) {
|
if (!hlist_empty(&ioc->cic_list)) {
|
||||||
struct cfq_io_context *cic;
|
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_list);
|
||||||
cic->dtor(ioc);
|
cic->dtor(ioc);
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ static void cfq_exit(struct io_context *ioc)
|
|||||||
if (!hlist_empty(&ioc->cic_list)) {
|
if (!hlist_empty(&ioc->cic_list)) {
|
||||||
struct cfq_io_context *cic;
|
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_list);
|
||||||
cic->exit(ioc);
|
cic->exit(ioc);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user