aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorPavel Tikhomirov <[email protected]>2025-07-21 03:49:13 +0000
committerMikulas Patocka <[email protected]>2025-07-31 13:39:55 +0000
commit8d05316d79d8afd20ba767efea8706d8238a9d46 (patch)
tree26251beabeb99b5e1b2521a163fa57e6bc6643a2 /drivers/md/dm-raid.c
parentvdo: omit need_resched() before cond_resched() (diff)
downloadkernel-8d05316d79d8afd20ba767efea8706d8238a9d46.tar.gz
kernel-8d05316d79d8afd20ba767efea8706d8238a9d46.zip
dm-raid: do not include dm-core.h
In commit 4cc96131afce ("dm: move request-based code out to dm-rq.[hc]") we have a note: "DM targets should _never_ include dm-core.h!". And it is not used in any DM targets except dm-raid now, so let's remove it from dm-raid for consistency, also use special helpers instead of accessing dm_table and mapper_device fields directly. This change is merely a cleanup and should not affect functionality. Signed-off-by: Pavel Tikhomirov <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r--drivers/md/dm-raid.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
index c4fa8e0e76d2..7257bf430037 100644
--- a/drivers/md/dm-raid.c
+++ b/drivers/md/dm-raid.c
@@ -14,7 +14,6 @@
#include "raid5.h"
#include "raid10.h"
#include "md-bitmap.h"
-#include "dm-core.h"
#include <linux/device-mapper.h>
@@ -3309,7 +3308,7 @@ size_check:
/* Disable/enable discard support on raid set. */
configure_discard_support(rs);
- rs->md.dm_gendisk = ti->table->md->disk;
+ rs->md.dm_gendisk = dm_disk(dm_table_get_md(ti->table));
mddev_unlock(&rs->md);
return 0;