aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2011-04-05 03:12:21 -0400
committerTakashi Iwai <tiwai@suse.de>2011-04-05 03:12:21 -0400
commit4e29402fe4b2006c994eed5020c42b2cc87d9b42 (patch)
treec0229c107045ab21487729f6a6cab6b70ed30bfa /drivers/md/md.c
parentf8852b12200df393b0a4db1a7052454bbc335443 (diff)
parent00b317a41c5428b13eb7e5b4bbc691b1aa7afa80 (diff)
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 06ecea751a39..8b66e04c2ea6 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1777,12 +1777,6 @@ int md_integrity_register(mddev_t *mddev)
1777 continue; 1777 continue;
1778 if (rdev->raid_disk < 0) 1778 if (rdev->raid_disk < 0)
1779 continue; 1779 continue;
1780 /*
1781 * If at least one rdev is not integrity capable, we can not
1782 * enable data integrity for the md device.
1783 */
1784 if (!bdev_get_integrity(rdev->bdev))
1785 return -EINVAL;
1786 if (!reference) { 1780 if (!reference) {
1787 /* Use the first rdev as the reference */ 1781 /* Use the first rdev as the reference */
1788 reference = rdev; 1782 reference = rdev;
@@ -1793,6 +1787,8 @@ int md_integrity_register(mddev_t *mddev)
1793 rdev->bdev->bd_disk) < 0) 1787 rdev->bdev->bd_disk) < 0)
1794 return -EINVAL; 1788 return -EINVAL;
1795 } 1789 }
1790 if (!reference || !bdev_get_integrity(reference->bdev))
1791 return 0;
1796 /* 1792 /*
1797 * All component devices are integrity capable and have matching 1793 * All component devices are integrity capable and have matching
1798 * profiles, register the common profile for the md device. 1794 * profiles, register the common profile for the md device.