Skip to content

Commit 289b50d

Browse files
committed
dm-raid: do not include dm-core.h
JIRA: https://issues.redhat.com/browse/RHEL-119009 Upstream Status: kernel/git/torvalds/linux.git commit 8d05316 Author: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Date: Mon Jul 21 11:49:13 2025 +0800 dm-raid: do not include dm-core.h In commit 4cc9613 ("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 <ptikhomirov@virtuozzo.com> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
1 parent 6c3593b commit 289b50d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/md/dm-raid.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "raid5.h"
1515
#include "raid10.h"
1616
#include "md-bitmap.h"
17-
#include "dm-core.h"
1817

1918
#include <linux/device-mapper.h>
2019

@@ -3313,7 +3312,7 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
33133312

33143313
/* Disable/enable discard support on raid set. */
33153314
configure_discard_support(rs);
3316-
rs->md.dm_gendisk = ti->table->md->disk;
3315+
rs->md.dm_gendisk = dm_disk(dm_table_get_md(ti->table));
33173316

33183317
mddev_unlock(&rs->md);
33193318
return 0;

0 commit comments

Comments
 (0)