Skip to content

Commit ea6a6a8

Browse files
committed
Merge: block: fix request.queuelist usage in flush
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4517 block: fix request.queuelist usage in flush JIRA: https://issues.redhat.com/browse/RHEL-43552 Signed-off-by: Ming Lei <ming.lei@redhat.com> Approved-by: Jeff Moyer <jmoyer@redhat.com> Approved-by: Chris Leech <cleech@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents 09b782a + 9e7ab8b commit ea6a6a8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

block/blk-flush.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ static void blk_flush_complete_seq(struct request *rq,
183183
/* queue for flush */
184184
if (list_empty(pending))
185185
fq->flush_pending_since = jiffies;
186-
list_move_tail(&rq->queuelist, pending);
186+
list_add_tail(&rq->queuelist, pending);
187187
break;
188188

189189
case REQ_FSEQ_DATA:
@@ -261,6 +261,7 @@ static enum rq_end_io_ret flush_end_io(struct request *flush_rq,
261261
unsigned int seq = blk_flush_cur_seq(rq);
262262

263263
BUG_ON(seq != REQ_FSEQ_PREFLUSH && seq != REQ_FSEQ_POSTFLUSH);
264+
list_del_init(&rq->queuelist);
264265
blk_flush_complete_seq(rq, fq, seq, error);
265266
}
266267

0 commit comments

Comments
 (0)