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

MD RAID10: Minor non-functional code changes

Changes include assigning 'addr' from 's' instead of 'sector' to be
consistent with the way the code does it just a few lines later and
using '%=' vs a conditional and subtraction.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>

authored by

Jonathan Brassow and committed by
NeilBrown
4c0ca26b c8dc9c65

+2 -3
+2 -3
drivers/md/raid10.c
··· 552 552 for (n = 0; n < geo->near_copies; n++) { 553 553 int d = dev; 554 554 sector_t s = sector; 555 - r10bio->devs[slot].addr = sector; 556 555 r10bio->devs[slot].devnum = d; 556 + r10bio->devs[slot].addr = s; 557 557 slot++; 558 558 559 559 for (f = 1; f < geo->far_copies; f++) { 560 560 d += geo->near_copies; 561 - if (d >= geo->raid_disks) 562 - d -= geo->raid_disks; 561 + d %= geo->raid_disks; 563 562 s += geo->stride; 564 563 r10bio->devs[slot].devnum = d; 565 564 r10bio->devs[slot].addr = s;