[PATCH] blk-mq: initialize csd/fifo_time before use

Yuwei Guan
2022-10-10T07:28:29Z

csd/fifo_time need to be initialized before use again,
otherwise, it will keep the last tag value.

Signed-off-by: Yuwei Guan <Yuwei.Guan@zeekrlife.com>
---
block/blk-mq.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 8070b6c10e8d..f55d41f1d150 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -383,6 +383,9 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data,
rq->end_io = NULL;
rq->end_io_data = NULL;

+ /* initialize csd/fifo_time before use */
+ memset(&rq->csd, 0x0, sizeof(rq->csd));
+
blk_crypto_rq_set_defaults(rq);
INIT_LIST_HEAD(&rq->queuelist);
/* tag was already set */
--
2.34.1

免责声明：本邮件所包含信息发给指定个人或机构，邮件可能包含保密或专属信息。未经接收者许可，不得阅读、转发或传播邮件内容，或根据邮件内容采取任何相关行动。如果错误地收到了此邮件，请与收件人联系并自行删除邮件内容。

Disclaimer：The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error , please contact the sender and delete the material from any computer .