Commit 8d05316d authored by Pavel Tikhomirov's avatar Pavel Tikhomirov Committed by Mikulas Patocka
Browse files

dm-raid: do not include dm-core.h



In commit 4cc96131 ("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: default avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
Reviewed-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
parent 225b2cb6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)

	/* 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;