diff options
author | Dave Hansen <dave.hansen@linux.intel.com> | 2014-01-08 22:17:46 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2014-01-08 22:17:46 -0500 |
commit | 6753471c0cb4562aebb9c70beb74ccd392d49ee8 (patch) | |
tree | 3f3d62b47427bcd2104f5b345b27ef93874388b9 /block | |
parent | 3d6efbf62c797a2924785f482e4ce8aa8820ec72 (diff) |
blk-mq: uses page->list incorrectly
'struct page' has two list_head fields: 'lru' and 'list'. Conveniently,
they are unioned together. This means that code can use them
interchangably, which gets horribly confusing.
The blk-mq made the logical decision to try to use page->list. But, that
field was actually introduced just for the slub code. ->lru is the right
field to use outside of slab/slub.
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-mq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 68734f87f1da..57039fcd9c93 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -1063,8 +1063,8 @@ static void blk_mq_free_rq_map(struct blk_mq_hw_ctx *hctx) | |||
1063 | struct page *page; | 1063 | struct page *page; |
1064 | 1064 | ||
1065 | while (!list_empty(&hctx->page_list)) { | 1065 | while (!list_empty(&hctx->page_list)) { |
1066 | page = list_first_entry(&hctx->page_list, struct page, list); | 1066 | page = list_first_entry(&hctx->page_list, struct page, lru); |
1067 | list_del_init(&page->list); | 1067 | list_del_init(&page->lru); |
1068 | __free_pages(page, page->private); | 1068 | __free_pages(page, page->private); |
1069 | } | 1069 | } |
1070 | 1070 | ||
@@ -1128,7 +1128,7 @@ static int blk_mq_init_rq_map(struct blk_mq_hw_ctx *hctx, | |||
1128 | break; | 1128 | break; |
1129 | 1129 | ||
1130 | page->private = this_order; | 1130 | page->private = this_order; |
1131 | list_add_tail(&page->list, &hctx->page_list); | 1131 | list_add_tail(&page->lru, &hctx->page_list); |
1132 | 1132 | ||
1133 | p = page_address(page); | 1133 | p = page_address(page); |
1134 | entries_per_page = order_to_size(this_order) / rq_size; | 1134 | entries_per_page = order_to_size(this_order) / rq_size; |