Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
md: check return code of read_sb_page
md/raid1: minor bio initialisation improvements.
md/raid1: avoid overflow in raid1 resync when bitmap is in use.

+8 -5
+5 -4
drivers/md/bitmap.c
··· 1000 1000 page = bitmap->sb_page; 1001 1001 offset = sizeof(bitmap_super_t); 1002 1002 if (!file) 1003 - read_sb_page(bitmap->mddev, 1004 - bitmap->mddev->bitmap_info.offset, 1005 - page, 1006 - index, count); 1003 + page = read_sb_page( 1004 + bitmap->mddev, 1005 + bitmap->mddev->bitmap_info.offset, 1006 + page, 1007 + index, count); 1007 1008 } else if (file) { 1008 1009 page = read_page(file, index, bitmap, count); 1009 1010 offset = 0;
+3 -1
drivers/md/raid1.c
··· 1839 1839 1840 1840 /* take from bio_init */ 1841 1841 bio->bi_next = NULL; 1842 + bio->bi_flags &= ~(BIO_POOL_MASK-1); 1842 1843 bio->bi_flags |= 1 << BIO_UPTODATE; 1844 + bio->bi_comp_cpu = -1; 1843 1845 bio->bi_rw = READ; 1844 1846 bio->bi_vcnt = 0; 1845 1847 bio->bi_idx = 0; ··· 1914 1912 !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) 1915 1913 break; 1916 1914 BUG_ON(sync_blocks < (PAGE_SIZE>>9)); 1917 - if (len > (sync_blocks<<9)) 1915 + if ((len >> 9) > sync_blocks) 1918 1916 len = sync_blocks<<9; 1919 1917 } 1920 1918