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

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 <ptikhomirov@virtuozzo.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

authored by

Pavel Tikhomirov and committed by
Mikulas Patocka
8d05316d 225b2cb6

+1 -2
+1 -2
drivers/md/dm-raid.c
··· 14 14 #include "raid5.h" 15 15 #include "raid10.h" 16 16 #include "md-bitmap.h" 17 - #include "dm-core.h" 18 17 19 18 #include <linux/device-mapper.h> 20 19 ··· 3308 3309 3309 3310 /* Disable/enable discard support on raid set. */ 3310 3311 configure_discard_support(rs); 3311 - rs->md.dm_gendisk = ti->table->md->disk; 3312 + rs->md.dm_gendisk = dm_disk(dm_table_get_md(ti->table)); 3312 3313 3313 3314 mddev_unlock(&rs->md); 3314 3315 return 0;