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

Merge branch 'md-next' of https://github.com/liu-song-6/linux into for-5.1/block

Pull MD changes for 5.1 from Song.

* 'md-next' of https://github.com/liu-song-6/linux:
raid1: simplify raid1_error function
md-linear: use struct_size() in kzalloc()

+3 -6
+1 -2
drivers/md/md-linear.c
··· 96 96 int i, cnt; 97 97 bool discard_supported = false; 98 98 99 - conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(struct dev_info), 100 - GFP_KERNEL); 99 + conf = kzalloc(struct_size(conf, disks, raid_disks), GFP_KERNEL); 101 100 if (!conf) 102 101 return NULL; 103 102
+2 -4
drivers/md/raid1.c
··· 1603 1603 return; 1604 1604 } 1605 1605 set_bit(Blocked, &rdev->flags); 1606 - if (test_and_clear_bit(In_sync, &rdev->flags)) { 1606 + if (test_and_clear_bit(In_sync, &rdev->flags)) 1607 1607 mddev->degraded++; 1608 - set_bit(Faulty, &rdev->flags); 1609 - } else 1610 - set_bit(Faulty, &rdev->flags); 1608 + set_bit(Faulty, &rdev->flags); 1611 1609 spin_unlock_irqrestore(&conf->device_lock, flags); 1612 1610 /* 1613 1611 * if recovery is running, make sure it aborts.