> + struct list_head *flush_list) > +{ > + struct block_device *bdev; > + struct request *rq; > + int error = -ENXIO; > + > + if (list_empty(flush_list)) > + return; > + > + rq = list_first_entry(flush_list, struct request, queuelist); > + /* Send flush via one active hctx so we can move on */ > + bdev = bdget_disk(rq->rq_disk, 0); > + if (bdev) { > + error = blkdev_issue_flush(bdev, GFP_KERNEL, NULL); > + bdput(bdev); > + } As mentioned before: please don't add pointless bdget calls, as we don't even need the block_device. Just open code the trivial bits of blkdev_issue_flushblkdev_issue_flush that are needed.