On Wed, Feb 03, 2021 at 09:45:27PM +0800, Xiao Ni wrote: > + if (__blkdev_issue_discard(rdev->bdev, start, size, > + GFP_NOIO, 0, &discard_bio) || !discard_bio) > + return; Very odd indentation. Normally this would be: if (__blkdev_issue_discard(rdev->bdev, start, size, GFP_NOIO, 0, &discard_bio) || !discard_bio) return; > + > + bio_chain(discard_bio, bio); > + bio_clone_blkg_association(discard_bio, bio); > + if (mddev->gendisk) > + trace_block_bio_remap(discard_bio, > + disk_devt(mddev->gendisk), > + bio->bi_iter.bi_sector); > + submit_bio_noacct(discard_bio); > +} > +EXPORT_SYMBOL(md_submit_discard_bio); EXPORT_SYMBOL_GPL like all the other exports in md.c, please. > +extern void md_submit_discard_bio(struct mddev *mddev, struct md_rdev *rdev, > + struct bio *bio, sector_t start, sector_t size); no need for the extern.