Skip to content

Commit e2bd967

Browse files
pebolleJens Axboe
authored andcommitted
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>
1 parent 28304f4 commit e2bd967

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/blk-ioc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ static void cfq_dtor(struct io_context *ioc)
2121
if (!hlist_empty(&ioc->cic_list)) {
2222
struct cfq_io_context *cic;
2323

24-
cic = list_entry(ioc->cic_list.first, struct cfq_io_context,
24+
cic = hlist_entry(ioc->cic_list.first, struct cfq_io_context,
2525
cic_list);
2626
cic->dtor(ioc);
2727
}
@@ -57,7 +57,7 @@ static void cfq_exit(struct io_context *ioc)
5757
if (!hlist_empty(&ioc->cic_list)) {
5858
struct cfq_io_context *cic;
5959

60-
cic = list_entry(ioc->cic_list.first, struct cfq_io_context,
60+
cic = hlist_entry(ioc->cic_list.first, struct cfq_io_context,
6161
cic_list);
6262
cic->exit(ioc);
6363
}

0 commit comments

Comments
 (0)