diff options
author | Ming Lei <ming.lei@canonical.com> | 2014-09-25 17:23:41 +0200 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-25 23:22:37 +0200 |
commit | 3c09676c12b1dabf84acbb5849bfc54acadaf092 (patch) | |
tree | 48dc1cd699cd175dc3370a464d34bd6d814fe1e7 /block/blk-flush.c | |
parent | block: introduce blk_init_flush and its pair (diff) | |
download | linux-3c09676c12b1dabf84acbb5849bfc54acadaf092.tar.xz linux-3c09676c12b1dabf84acbb5849bfc54acadaf092.zip |
block: move flush initialization to blk_flush_init
These fields are always used with the flush request, so
initialize them together.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
-rw-r--r-- | block/blk-flush.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c index c72ab32fd8eb..a49ffbdcfcdc 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -488,6 +488,10 @@ static int blk_mq_init_flush(struct request_queue *q) int blk_init_flush(struct request_queue *q) { + INIT_LIST_HEAD(&q->flush_queue[0]); + INIT_LIST_HEAD(&q->flush_queue[1]); + INIT_LIST_HEAD(&q->flush_data_in_flight); + if (q->mq_ops) return blk_mq_init_flush(q); |