On Mon, Apr 17, 2023 at 03:22:21PM +0900, Damien Le Moal wrote: > > +static void blk_rq_init_flush(struct request *rq) > > +{ > > + memset(&rq->flush, 0, sizeof(rq->flush)); > > + INIT_LIST_HEAD(&rq->flush.list); > > + rq->rq_flags |= RQF_FLUSH_SEQ; > > + rq->flush.saved_end_io = rq->end_io; /* Usually NULL */ > > + rq->end_io = mq_flush_data_end_io; > > +} > > struct flush is: > > struct { > unsigned int seq; > struct list_head list; > rq_end_io_fn *saved_end_io; > } flush; > > So given that list and saved_end_io are initialized here, we could remove the > memset() by initializing seq "manually": Yes. And seq is always initialized in the callers, and I think I can also removed saved_end_io entirely. So maybe we can drop this patch in the end and just do some other changes.