diff options
| -rw-r--r-- | drivers/md/dm-table.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index 986b8754bb08..322669807077 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
| @@ -1238,14 +1238,15 @@ static void dm_table_set_integrity(struct dm_table *t) | |||
| 1238 | return; | 1238 | return; |
| 1239 | 1239 | ||
| 1240 | template_disk = dm_table_get_integrity_disk(t, true); | 1240 | template_disk = dm_table_get_integrity_disk(t, true); |
| 1241 | if (!template_disk && | 1241 | if (template_disk) |
| 1242 | blk_integrity_is_initialized(dm_disk(t->md))) { | 1242 | blk_integrity_register(dm_disk(t->md), |
| 1243 | blk_get_integrity(template_disk)); | ||
| 1244 | else if (blk_integrity_is_initialized(dm_disk(t->md))) | ||
| 1243 | DMWARN("%s: device no longer has a valid integrity profile", | 1245 | DMWARN("%s: device no longer has a valid integrity profile", |
| 1244 | dm_device_name(t->md)); | 1246 | dm_device_name(t->md)); |
| 1245 | return; | 1247 | else |
| 1246 | } | 1248 | DMWARN("%s: unable to establish an integrity profile", |
| 1247 | blk_integrity_register(dm_disk(t->md), | 1249 | dm_device_name(t->md)); |
| 1248 | blk_get_integrity(template_disk)); | ||
| 1249 | } | 1250 | } |
| 1250 | 1251 | ||
| 1251 | static int device_flush_capable(struct dm_target *ti, struct dm_dev *dev, | 1252 | static int device_flush_capable(struct dm_target *ti, struct dm_dev *dev, |
