Skip to content

Commit 8d05316

Browse files
SnorchMikulas Patocka
authored andcommitted
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 <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
1 parent 225b2cb commit 8d05316

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

@@ -3309,7 +3308,7 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
33093308

33103309
/* Disable/enable discard support on raid set. */
33113310
configure_discard_support(rs);
3312-
rs->md.dm_gendisk = ti->table->md->disk;
3311+
rs->md.dm_gendisk = dm_disk(dm_table_get_md(ti->table));
33133312

33143313
mddev_unlock(&rs->md);
33153314
return 0;

0 commit comments

Comments
 (0)