Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

md: use mddev_is_dm() instead of open-coding gendisk checks

Replace direct checks on mddev->gendisk with mddev_is_dm() in
md_handle_request() and md_run().

Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
Link: https://lore.kernel.org/linux-raid/20260423101303.48196-3-abd.masalkhi@gmail.com
Signed-off-by: Yu Kuai <yukuai@fnnas.com>

authored by

Abd-Alrhman Masalkhi and committed by
Yu Kuai
408434a3 c1a3cdb0

+2 -2
+2 -2
drivers/md/md.c
··· 408 408 409 409 if (!mddev->pers->make_request(mddev, bio)) { 410 410 percpu_ref_put(&mddev->active_io); 411 - if (!mddev->gendisk && mddev->pers->prepare_suspend) 411 + if (mddev_is_dm(mddev) && mddev->pers->prepare_suspend) 412 412 return false; 413 413 goto check_suspended; 414 414 } ··· 6746 6746 } 6747 6747 6748 6748 /* dm-raid expect sync_thread to be frozen until resume */ 6749 - if (mddev->gendisk) 6749 + if (!mddev_is_dm(mddev)) 6750 6750 mddev->recovery = 0; 6751 6751 6752 6752 /* may be over-ridden by personality */